|
想汇总E列加后面所有①的列的各行的值,请问大佬怎么解决,我自己写了一段就是运行不了
If wb2.Sheets(1).Range("c3") = "①" Then
wb2.Sheets(1).Range("C4:C23").Select
Selection.Copy
Windows(str).Activate
Range("E3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Windows("2.xls").Activate
Else
wb2.Sheets(1).Range("e3:e22") = 0
End If
If wb2.Sheets(1).Range("d3") = "②" Then
wb2.Sheets(1).Range("D4:D23").Select
Selection.Copy
Windows(str).Activate
Range("I3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Windows("2.xls").Activate
Else
wb2.Sheets(1).Range("I3:I22") = 0
End If
If wb2.Sheets(1).Range("e3") = "③" Then
Windows(str).Activate
For x = 6 To 20
If wb2.Sheets(1).Cells(3, x) = "①" Then
For y = 3 To 22
wb.Sheets(1).Range("m" & y) = wb2.Sheets(1).Range("e" & y + 1) + wb2.Sheets(1).Cells(y + 1, x)
Next
End If
x = x + 1
Next
Else
wb2.Sheets(1).Range("m" & y) = wb.sheess(1).cell(y + 1, x)
End If
|
|