Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
trying to insert a formula
I'm trying to put a formula in a cell that sums from the row
immediately above to a row whose number I saved previously as a variable (lPrevSumRow): With ActiveSheet .Cells(lNextRow, "H") = "Totals" .Cells(lNextRow, "I").Formula = "=Sum(.Cells(lNextRow - 1, 9).Cells(lPrevSumRow, 9))" End With I have figured out the putting the formula in quotes isn't working because I'm getting an error on the Sum function. XL isn't recognizing the (.cells(lNextRow....) while it's in quotes. Is there anyway to insert the formula with the range to be summed as a variable rather than actual cell addresses? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to insert a formula? | Excel Discussion (Misc queries) | |||
insert formula | Excel Worksheet Functions | |||
How to insert = in formula bar | Excel Discussion (Misc queries) | |||
insert formula | Excel Programming | |||
insert a new row by formula | Excel Worksheet Functions |