Hello,
My current macro works but I really need it to be an IF THEN statement. It currently looks at Sheet "RTW Report" range U2 to last row minus 2 and copies any cells with values into another sheet called "Charges" into C18. It then does the same thing for Column V on the "RTW Report" sheet and pastes those values under the last row in column C on the "Charges" sheet.
However, sometimes there are no values in Columns U or V and if so it is currently bombing out. I think an IF then statement will work but I am having trouble with it. Thanks!
Current macro:
Dim lr As Long
Sheets("RTW Report").Activate
lr = Cells(Rows.Count, "U").End(xlUp).Row
Sheets("RTW Report").Range("U2:U" & lr - 2).SpecialCells(xlCellTypeConstants, xlNumbers).Copy Sheets("Charges").Range("C18")
Dim lr2 As Long
Sheets("RTW Report").Activate
lr2 = Cells(Rows.Count, "V").End(xlUp).Row
Sheets("Charges").Activate
Sheets("RTW Report").Range("V2:V" & lr2 - 2).SpecialCells(xlCellTypeConstants, xlNumbers).Copy Sheets("Charges").Range(Cells((CHARGE1 + 18), 3), Cells((CHARGE1 + 18), 3))
My current macro works but I really need it to be an IF THEN statement. It currently looks at Sheet "RTW Report" range U2 to last row minus 2 and copies any cells with values into another sheet called "Charges" into C18. It then does the same thing for Column V on the "RTW Report" sheet and pastes those values under the last row in column C on the "Charges" sheet.
However, sometimes there are no values in Columns U or V and if so it is currently bombing out. I think an IF then statement will work but I am having trouble with it. Thanks!
Current macro:
Dim lr As Long
Sheets("RTW Report").Activate
lr = Cells(Rows.Count, "U").End(xlUp).Row
Sheets("RTW Report").Range("U2:U" & lr - 2).SpecialCells(xlCellTypeConstants, xlNumbers).Copy Sheets("Charges").Range("C18")
Dim lr2 As Long
Sheets("RTW Report").Activate
lr2 = Cells(Rows.Count, "V").End(xlUp).Row
Sheets("Charges").Activate
Sheets("RTW Report").Range("V2:V" & lr2 - 2).SpecialCells(xlCellTypeConstants, xlNumbers).Copy Sheets("Charges").Range(Cells((CHARGE1 + 18), 3), Cells((CHARGE1 + 18), 3))