在VBA中连接0
我有两列(第一个包含值0
,第二个包含值1
)。
这个语句返回1
,而不是01
Cells(1, 26).Value = CStr(Cells(1, 24).Value) & CStr(Cells(1, 25).Value)
我想在第三列连接到01
。 我该怎么做呢?
当你把一个整数值的单元格中,格式设置为数字。 您可以使用:
Cells(1, 26).NumberFormat = "@" 'This set cell format to Text Cells(1, 26).Value = CStr(Cells(1, 24).Value) & CStr(Cells(1, 25).Value)