|
Sub ()
Sheet305.Range("p2:t1048576").ClearContents
Application.ScreenUpdating = False
Dim ar, br, cr, dr, er, fr, gr, hr
ar = Sheet202.Range("a2:g" & Sheet202.Range("a1048576").End(3).Row)
ReDim br(1 To UBound(ar), 1 To 4)
cr = Cells(Cells.Rows.Count, 1).End(xlUp).Row
For dr = 2 To Sheet105.UsedRange.Rows.Count
If Application.CountIf(Sheet202.Range("c:c"), Sheet105.Cells(dr, 15)) >= 1 Then
For er = 1 To UBound(ar)
If InStr(ar(er, 3), Replace(Sheet105.Range("o" & dr).Value, "*", "")) > 0 Then
fr = fr + 1
For gr = 1 To 4
br(fr, gr) = ar(er, gr)
Next
End If
Next
End If
Next
Range("a" & cr + 1).Resize(fr, 4) = br
Application.ScreenUpdating = True
End Sub
求助:从上述代码中哪里可以看出其查询结果只显示在A列,我想把查询的结果显示到o列该如何修改,谢谢各位高手的指点。
|
|