你是需要用VB编程还是在EXCEL表格裏实现编程?
VBA代码如下:
在EXCEL 中创建一个新的宏,然后粘贴下面代码:
Dim I As Integer
For I = 1 To 10000 '假设数据有10000行
DoEvents
If Sheet1.Cells(I, 1) = Sheet2.Cells(I, 1) _
And Sheet1.Cells(I, 2) = Sheet2.Cells(I, 2) _
And Sheet1.Cells(I, 3) = Sheet2.Cells(I, 3) Then
Sheet1.Cells(I, 4) = Sheet2.Cells(I, 4)
Sheet1.Cells(I, 5) = Sheet2.Cells(I, 5)
End If
Next
然后执行被创建的宏即可.
那是"VBA"