Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering Sum formula into a cell
Hi Parker,
Not exactly what you want but it works: Sub tryme() Dim myarea As Range arow = 5 brow = 7 acell = "N" & arow bcell = "N" & brow Set myarea = Range(acell, bcell) For Each mycell In myarea s = s + mycell Next MsgBox s End Sub Bernard "Parker" < wrote in message ... I am having trouble entering a sum formula from a macro into a cell. I have defined variables called 'StartRow' and 'EndRow' and I want to enter a sum formula for column N from 'StartRow' to 'EndRow' into the active cell. I don't know how to incopropate the variables into the sum formula. Any help would be greatly appreciated. Thanks in advance! Parker |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Entering Formula - Cannot select cell as it is hidden by formula | Excel Worksheet Functions | |||
Warning when in another cell after entering a formula. | Excel Worksheet Functions | |||
entering a formula into a cell with text | Excel Discussion (Misc queries) | |||
Entering Sum formula into a cell | Excel Programming | |||
Entering Sum formula into a cell | Excel Programming |