Hi,
I'd like to combine below two codes together. Can someone help me with how to combine them.
I'd like to combine below two codes together. Can someone help me with how to combine them.
VBA Code:
Sub MoveRangeWBC()
Worksheets("WBC").Range("E25:E60").Copy Destination:=Worksheets("Summary").Range("C4")
Worksheets("WBC").Range("W25:W60").Copy Destination:=Worksheets("Summary").Range("D4")
Worksheets("WBC").Range("E25:E60").Copy Destination:=Worksheets("Summary").Range("C39")
Worksheets("WBC").Range("AB25:AB60").Copy Destination:=Worksheets("Summary").Range("D39")
Dim iCntr
Dim rng As Range
Set rng = Worksheets("Summary").Range("B4:F1111")
For iCntr = rng.Row + rng.Rows.Count - 1 To rng.Row Step -1
If Application.WorksheetFunction.CountA(Rows(iCntr)) = 0 Then Rows(iCntr).EntireRow.Delete
Next
With Worksheets("WBC")
.Range("W22").Copy Destination:=Worksheets("Summary").Range("B4:B33")
.Range("AB22").Copy Destination:=Worksheets("Summary").Range("B34:B64")
End With
End Sub
Code:
Sub ChangeHeaders()
With Worksheets("WBC")
.Range("W22").Copy Destination:=Worksheets("ST").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("ST").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("WBA").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("WBA").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("WRO").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("WRO").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("WGI").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("WGI").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("WFP").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("WFP").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("WGP").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("WGP").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("WMP").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("WMP").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("MPM").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("MPM").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("MTM").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("MTM").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("MHI").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("MHI").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("MDW").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("MDW").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("CFP").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("CFP").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("CPE").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("CPE").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("CWC").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("CWC").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("RBO").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("RBO").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("RPE").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("RPE").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("RTA").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("RTA").Range("AB22")
.Range("W22").Copy Destination:=Worksheets("OSA").Range("W22")
.Range("AB22").Copy Destination:=Worksheets("OSA").Range("AB22")
End With
End Sub