VBA合并两个Excel表的数据到目标表
代码说明:
"" 从src1.name和src2.age按ID获取数据,然后将数据设置为dst Sub hebing() Dim dstRowNo As Long Dim src1RowNo As Long Dim src2RowNo As Long With ActiveWorkbook dstRowNo = 1 Do While .Sheets("dst").Cells(dstRowNo, 1).Text "" dstID = .Sheets("dst").Cells(dstRowNo, 1).Text src1RowNo = 1 Do While .Sheets("src1").Cells(src1RowNo, 1).Text "" src1ID = .Sheets("src1").Cells(src1RowNo, 1).Text If dstID = src1ID Then
下载说明:请别用迅雷下载,失败请重下,重下不扣分!