Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
punter
 
Posts: n/a
Default Macro question


Hi,

I'm pretty new to the macro world but getting better. I am putting
together a macro that does some calculations and format functions. One
of the things I'm asking it to do is sum a column. The problem I'm
running into is that the number of rows on the sheet will vary. If
there are more rows on a sheet than the one that I used to record the
macro it is summing in the wrong place. Here is how the sum function
was recorded in the macro:

ActiveCell.FormulaR1C1 = "=SUM(R[-4127]C:R[-2]C)"

Question: How do I get excel to sum that column no matter how many
cells there are? Currently it is summing everything up to 4127 and not
beyond. I'm looking right now through the macro help but haven't
tripped across the answer yet.

Thanks as always,

Eddie


--
punter


------------------------------------------------------------------------
punter's Profile: http://www.excelforum.com/member.php...fo&userid=2044
View this thread: http://www.excelforum.com/showthread...hreadid=550982

 
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
Quick Macro question - How to delete two rows then skip one - and repeat David Smithz Excel Discussion (Misc queries) 3 March 3rd 06 02:58 PM
Excel Macro Question billrl34 Excel Worksheet Functions 1 December 19th 05 10:38 PM
using a macro question revisited Adam Kroger Excel Discussion (Misc queries) 4 December 16th 05 03:37 PM
Excel Macro Question about Conditional Formatting David Britton via OfficeKB.com New Users to Excel 3 February 10th 05 02:23 PM
Attn: Dave P. Question re Pix Calls via Macro DocuMike Excel Discussion (Misc queries) 1 January 10th 05 01:38 AM


All times are GMT +1. The time now is 11:07 PM.

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

About Us

"It's about Microsoft Excel"