garethtnash
asked on
Excel Copy Macro down foe each row
Hell All,
I have the macro below - which works fine on row 1, however I want it to run for every row that has data on it?
How do I do this?
Thanks
I have the macro below - which works fine on row 1, however I want it to run for every row that has data on it?
How do I do this?
Sub ConsolidateHours()
'
' ConsolidateHours Macro
' Consolidate Hours
'
' Keyboard Shortcut: Ctrl+Shift+H
'
Range("AJ3:AJ" & Rows.Count).Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-27]+RC[-24]+RC[-21])"
Range("AK3:AK" & Rows.Count).Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-19]+RC[-16])"
Range("AL3:AL" & Rows.Count).Select
ActiveCell.FormulaR1C1 = "=RC[-14]"
Range("AM3:AM" & Rows.Count).Select
ActiveCell.FormulaR1C1 = "=RC[-12]"
Range("AN3:AN" & Rows.Count).Select
ActiveCell.FormulaR1C1 = "=RC[-10]"
Range("AO3:AO" & Rows.Count).Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-5]:RC[-1])"
End Sub
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER