vba - Split cell content by "';" using VBA or Excel formula
问题描述
I am new to VBA, so I have trouble writing code in VBA. My problem is writing a code or an Excel formula to extract (for later use) the identifiers that are written in the same cell, split by ";".
For example, this is what I have on a cell: A11;B22;C33
I need to select A11, B22, C33, as they were written for example, on a column, as different cells, so I can later use them in other formulas. I don't want to split the content into different columns, I just want to be able to use A11 or B11 furthermore, without editing it in the databse
Thank you!
解决方案
您可以使用拆分功能并通过分隔符(;在你的情况下)
例如:
Var arrayResult = Split("A11;B22;C33",";")
您还可以在 excel 中使用文本到列实用程序。
选择要分隔的文本
- 转到数据 >
- 选择文本到列>
- 选择分隔选项单击下一步>
- 选择您喜欢的分隔符;
- 点击下一步
您将获得单独的值。
推荐阅读
- recursion-schemes - 代数接收项目位置的态射
- javascript - Brain.js 在训练中返回 null、NaN 值
- r - R中5个变量的密度图
- r - blogdown 0.21 serve_site() 不再为站点提供服务
- android - 是否可以手动调用android生命周期方法?
- android - 摩托罗拉手机与三星手机 UI 问题
- php - Laravel - 如何将数据变量从 2 个独立的 livewire 组件控制器发布到单个刀片文件以实现 CRUD 功能?
- c# - c# 扩展在 Linux 的 VSCode 中不起作用
- javascript - 如何在 Gatsby 中循环播放 ACF 灵活内容?
- python - pygame 函数无法更新 .rect 框以显示新值