Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
copying dynamic range based on cell outside of range xcelelder Excel Programming 3 September 29th 05 05:08 PM
select dynamic range with dynamic start point Juli Excel Programming 1 August 31st 05 12:05 AM
Dynamic range FinChase Excel Programming 5 November 19th 04 07:45 AM
Excel 2000 VBA - Set Print Range in dynamic range sub_pop[_5_] Excel Programming 2 July 27th 04 08:01 PM


All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"