Excel 2010 从 1 个单元格宏中拆分文本
好吧,这里有一个简单的问题,我也遇到了寻找可靠解决方案的问题。假设我有两列; A 和 B。在“A”列中,将有包含诸如“项目名称 AZ673”之类的名称的单元格,然后在“B”列中将有一个 ID 号,如“AZ673”。如果我想快速从 A 列中的每个名称中删除该 ID 号,我该怎么做?请记住,名称和 ID 之间没有逗号或符号,只有一个空格。但是列彼此相邻,并且单元格并排并排,两者都包含相同的 ID。执行此操作的宏将太棒了,提前感谢您提供任何解决方案!
Ok, quick question here that I am having issues finding a solid solution too.. Let's say I have two columns; A and B. In column "A" There would be cells containing names such as "Item name AZ673" and then in column "B" there would be an ID number such as "AZ673". If I wanted to quickly remove that ID Number from each of the Names in Column A, How would I do that? Keep in mind there is no Comma or symbol between the Name and ID, just a space.. But the Columns are right by each other, and the Cells are Side by Side Containing the same ID's in both.. A macro to do this would be wonderful, Thank you in advanced for any solutions!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一个简单的循环遍历单元格就可以解决问题。
注意:如果您有很多行(数十或数百行)来处理这样的迭代单元格,那么速度可能会很慢。如果您需要的话,有很多方法可以加快速度
a simple loop throught he cells will do the trick
Note: if you have many rows (read 10's or 100's of thousands) to process iterating cells like this can be slow. there are many ways to speed it up if you need them
创建另一列并使用以下公式:
Create another column and use this formula: