LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Help: Dynamic Total Updates?

Sorry for posting this again, previous posting of it never got a
response from anybody and I need to get it solved.

I have a macro that adds new rows and copies formulas to these new
rows, I need to make my totals update to include all the new rows, but
the number of rows added is not static

This is what i have for trying to update the formulas when new rows are
added:
With Worksheets("Data")
..Cells(.UsedRange.Rows.Count, 8).FormulaR1C1 = "=SUM(H2:" & _
..Cells((.UsedRange.Rows.Count - 1), 8) & ")"

..Cells(.UsedRange.Rows.Count, 9).FormulaR1C1 = "=SUM(I2:" & _
..Cells((.UsedRange.Rows.Count - 1), 9) & ")"

..Cells(.UsedRange.Rows.Count, 10).FormulaR1C1 = "=SUM(J2:" & _
..Cells((.UsedRange.Rows.Count - 1), 10) & ") +" _
& .Cells(.UsedRange.Rows.Count, 6).Value

End With

Obviously, it doesn't work as submitted. I'm pretty sure the problem is
in the formula, specifically, when I try to reference the new range i
want to work with. I have an idea of what the problem is, I just can't
for the life of me figure out how to change it to make it work properly

I would also like to make these formulas instead only display the sum
of the visible rows (on the last formula, i would also like it to only
add the cell in column 6 if all the rows are visible, note there is a
column hidden that will always remain hidden)

Subtotal will not work because i'm not using filters when the rows are
hidden

thanks for the help everybody, you've all been great with every
question i've asked in the past

 
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
Auto updates with checkbox that affects total slimjater Excel Worksheet Functions 1 July 19th 08 08:35 AM
Dynamic Updates on Compiled Worksheet Bilbert Excel Worksheet Functions 0 June 24th 08 08:28 PM
dynamic form updates Shawn G. Excel Programming 2 October 19th 05 05:42 PM
Dynamic Chart updates [email protected] Excel Programming 0 October 7th 05 07:03 PM
Add total row below dynamic list Laura[_7_] Excel Programming 1 September 18th 03 12:39 AM


All times are GMT +1. The time now is 04:52 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"