Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sum in a dynamic range
Hi
I need to produce code to add a formula in a cell at the bottom of a column full of data which sums the values in that column. However the number of rows in the column may vary. I can see the a formula R1C1 is needed to take the Sum function but this requires R1C1 references. How can I change this to accept the dynamic range. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sum in a dynamic range
Alan -
Sub d() With Sheet1.Range("c1") .End(xlDown).Offset(1).Formula = "=sum(" & .Address & ":" & ..End(xlDown).Address & ")" End With End Sub "Alan M" wrote in message ... Hi I need to produce code to add a formula in a cell at the bottom of a column full of data which sums the values in that column. However the number of rows in the column may vary. I can see the a formula R1C1 is needed to take the Sum function but this requires R1C1 references. How can I change this to accept the dynamic range. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dynamic Range with unused formula messing up x axis on dynamic graph | Charts and Charting in Excel | |||
copying dynamic range based on cell outside of range | Excel Programming | |||
select dynamic range with dynamic start point | Excel Programming | |||
Dynamic range | Excel Programming | |||
Excel 2000 VBA - Set Print Range in dynamic range | Excel Programming |