Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm trying to sum up some cells in a simple formula to assign to a different cell. For example "=sum(E5:E33)" However, do I create the above line of code without hard-coding the range? I do not want to used named ranges as I have thousand of rows to sum up. Your help is appreciated. Rusty |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dim rng as Range
set rng = Range(cells(5,5),cells(5,5).End(xldown)) ActiveCell.Formula = "=Sum(" & rng.Address & ")" where rng is a reference to the range you want summed -- Regards, Tom Ogilvy "Rusty" wrote in message .com... Hi, I'm trying to sum up some cells in a simple formula to assign to a different cell. For example "=sum(E5:E33)" However, do I create the above line of code without hard-coding the range? I do not want to used named ranges as I have thousand of rows to sum up. Your help is appreciated. Rusty |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom. That really helped :)
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I assign a value to a cell without putting a formula in it | Excel Worksheet Functions | |||
Formula - assign a cell to show the next | Excel Worksheet Functions | |||
assign formula to another cell | Excel Worksheet Functions | |||
Change cell formula & assign to VBA variable... | Excel Programming | |||
Create a formula into a String then assign string to a cell | Excel Programming |