|
If [a100000].End(3).Row > 1 Then
Range(Cells(2, 1), Cells([a100000].End(3).Row, 6)).ClearContents
End If
hs = 2
For i = 1 To Worksheets.Count
If Worksheets(i).Name <> "汇总" Then
For j = 3 To Worksheets(i).[a100000].End(3).Row
For k = 4 To Worksheets(i).[a2].End(2).Column
If Not IsEmpty(Worksheets(1).Cells(j, k)) Then
s1 = Worksheets(i).Cells(j, 1)
s2 = Worksheets(i).Cells(2, k)
s3 = Worksheets(i).Cells(j, 2)
s4 = Worksheets(i).Cells(j, k)
s5 = Worksheets(i).Cells(j, 3)
s6 = s4 * s5
Cells(hs, 1) = s1
Cells(hs, 2) = s2
Cells(hs, 3) = s3
Cells(hs, 4) = s4
Cells(hs, 5) = s5
Cells(hs, 6) = s6
hs = hs + 1
End If
Next k
Next j
End If
Next i
|
|