如何将第一列的字符串值附加到行的其余部分中的所有单元格值
In Excel VBA
I have a string value in the first column of each row. Each column after on that row contains a single word string. I need to append the first column to each of the other cells in that row. Rows are unique.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用其他工作表。假设yout源数据位于名为
sheet1
的工作表中,只需转到另一个工作表,然后在列中贴上这些字符串值。在单元格B2类型中:注意公式中的混合引用。拖到右和底部,然后看到魔术:
您需要拖动直到
Sheet1
的最后一个单元格,因此,如果您的原始数据直到单元格为止,请说>
> H203
,在第二张纸中,您将直接拖动直至首先直至第203行。VBA代码相同:
Use a different worksheet. Let's say yout source data is in a worksheet named
Sheet1
Just go to another worksheet and in column A paste those string values. In cell B2 type:Notice the mixed references in the formula. Drag to right and bottom and see the magic:
You need to drag until last cell of data from
Sheet1
so if your original data goes until cell, let's sayH203
, in the second sheet you would drag directly until column H first and then until row 203.VBA code would be the same: