菜鸟试了一下,不知是不是你想要的,
Dim rng As Range
If Range('a65536').End(xlUp).Row >= 3 Then
Range('a3:c' & Range('a65536').End(xlUp).Row).ClearContents
End If
For Each rng In Sheets('源数据').Range('a5:a' & Sheets('源数据').Range('a65536').End(xlUp).Row)
If rng >= Sheets('源数据').Range('b1') And rng <= Sheets('源数据').Range('d1') Then
a = Application.Max(Range('a65536').End(xlUp).Row, 2)
Cells(a + 1, 1) = rng
If Sheets('源数据').Cells(rng.Row, 'c') <> 0 Or Sheets('源数据').Cells(rng.Row, 'd') <> 0 Then
Cells(a + 1, 2) = Application.Max(Sheets('源数据').Cells(rng.Row, 'c'), Sheets('源数据').Cells(rng.Row, 'd'))
Else
Cells(a + 1, 2) = ''
End If
If Sheets('源数据').Cells(rng.Row, 'f') > 200 Then
Cells(a + 1, 3) = Sheets('源数据').Cells(rng.Row, 'f')
Else
If Sheets('源数据').Cells(rng.Row, 'e') <> 0 Then
Cells(a + 1, 3) = Sheets('源数据').Cells(rng.Row, 'e')
Else
Cells(a + 1, 3) = ''
End If
End If
End If
Next
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。