|
Sub 查找() Dim i, j, k, arr, brr, x, y, rng As Range Dim jgsheet As Worksheet, yssheet As Worksheet Set jgsheet = Worksheets("结果") Set yssheet = Worksheets("原始") x = Trim(jgsheet.Cells(1, 9)) j = 2 For i = 1 To yssheet.Cells(Rows.Count, "J").End(xlUp).Row If Trim(yssheet.Cells(i, 10)) = x Then jgsheet.Cells(j, 1) = yssheet.Cells(i, 1) jgsheet.Cells(j, 2) = yssheet.Cells(i, 6) jgsheet.Cells(j, 3) = yssheet.Cells(i, 7) jgsheet.Cells(j, 4) = yssheet.Cells(i, 28) jgsheet.Cells(j, 5) = yssheet.Cells(i, 29) jgsheet.Cells(j, 6) = yssheet.Cells(i, 44) j = j + 1 End If Next MsgBox ("查找完毕") End Sub |
|