Hello. WHy is this code not working?
Lastrow = Range("D" & Rows.Count).End(xlUp).Row Sheets("GL").Range("E2:E & Lastrow").Formulas = "=sum(C2:D2)"
Hello. WHy is this code not working?
Lastrow = Range("D" & Rows.Count).End(xlUp).Row Sheets("GL").Range("E2:E & Lastrow").Formulas = "=sum(C2:D2)"
May be
Sub Test() Lastrow = Sheets("GL").Range("D" & Rows.Count).End(xlUp).Row With Sheets("GL").Range("E2:E" & Lastrow) .Formula = "=sum(C2:D2)" End With End Sub
Last edited by YasserKhalil; 08-14-2015 at 06:00 PM.
< ----- Please click the little star * next to add reputation if my post helps you
Visit Forum : From Here
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks