NEED HELP URGENT!!!
Posted by Colin on November 16, 2001 8:00 AM
I need to develop a macro to put the sum formula into a cell in a worksheet the following code won't work because it throws an object or application-defined error:
r = Selection.Row
c = Selection.Column
Selection = "=SUM("
For counter = 10 To 850
If Cells(counter, 2) = "1200" Then
Worksheets("2001-2002").Cells(r, c) = Worksheets("2001-2002").Cells(r, c) + "salaries!L" + CStr(counter) + "+"
All I need to knowis how this code needs to be changed in order to make the code work and print the sum function in the cell.