billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
Good morning all
Found some code on the forum to sum a column. Unfortunately I am incurring an error. Can anyone assist.
code =
Dim lastrow As Long
lastrow = Range("D" & Rows.Count).End(xlUp).Row
.Range("D" & lastrow + 1).Value = WorksheetFunction.Sum(.Range("D5:D" & lastrow))
End With
Also need to sum adjacent columns "E:L" individually
Found some code on the forum to sum a column. Unfortunately I am incurring an error. Can anyone assist.
code =
Dim lastrow As Long
lastrow = Range("D" & Rows.Count).End(xlUp).Row
.Range("D" & lastrow + 1).Value = WorksheetFunction.Sum(.Range("D5:D" & lastrow))
End With
Also need to sum adjacent columns "E:L" individually