Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Unhappy SUBTOTAL not updating correctly

I have an excel table with subtotals.

Some of the subtotals are not updating correctly. Others are!!

In the attached file:
Column [NetAmt2] is dependent on cell C5...named BKSTransUseDate.
Cell M209 holds the subtotal for column [NetAmt2]. It is not updating correctly when cell C5 is changed.

Column [Sh Obl2] is also dependent on cell C5... but it seems to be updating correctly.

I've built a data table in cells $I$216:$O$227 that is dependent on this subtotal being updated correctly when C5 changes.

I know this isn't the cleanest example...but any help would be greatly appreciated.
Attached Files
File Type: zip Bad Subtotal Example.zip (41.0 KB, 80 views)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default SUBTOTAL not updating correctly

"DVEINTIMILLA" wrote:
Column [NetAmt2] is dependent on cell C5...named BKSTransUseDate.
Cell M209 holds the subtotal for column [NetAmt2]. It is not
updating correctly when cell C5 is changed.
Column [Sh Obl2] is also dependent on cell C5... but it seems
to be updating correctly.

[....]
Download: http://www.excelbanter.com/attachmen...tachmentid=712


Both M209 and N209 change when I change C5 from 12/20/12 to 6/1/12
arbitrarily. (I am making no effort to try to understand the logic of your
worksheet.)

Note that M209 has the formula =SUBTOTAL(109,[NetAmt2]) and N209 has the
formula =SUM([Sh Obl2]).

My guess is: __you__ change C5 (you neglect to give an example the
demonstrates how), it causes changes in some hidden cells in [NetAmt2], but
no non-hidden cells. Ergo, SUBTOTAL(109,...) correctly remains unchanged.
In contrast, I stumbled onto a value for C5 that changes non-hidden cells
(et al?). Ergo, SUBTOTAL(109,...) does change.

But when I change C5 to 6/1/12, I notice that the amounts in J109 and K109
do not change. They have the formulas =SUBTOTAL(109,[NetAmt]) and
=SUBTOTAL(109,[Sh Obl]).

Is that what you expect? Or are those the unchanging values that you really
want to discuss?

  #3   Report Post  
Junior Member
 
Posts: 3
Default

Quote:
Originally Posted by joeu2004[_2_] View Post
"DVEINTIMILLA" wrote:
Column [NetAmt2] is dependent on cell C5...named BKSTransUseDate.
Cell M209 holds the subtotal for column [NetAmt2]. It is not
updating correctly when cell C5 is changed.
Column [Sh Obl2] is also dependent on cell C5... but it seems
to be updating correctly.

[....]
Download: http://www.excelbanter.com/attachmen...tachmentid=712


Both M209 and N209 change when I change C5 from 12/20/12 to 6/1/12
arbitrarily. (I am making no effort to try to understand the logic of your
worksheet.)

Note that M209 has the formula =SUBTOTAL(109,[NetAmt2]) and N209 has the
formula =SUM([Sh Obl2]).

My guess is: __you__ change C5 (you neglect to give an example the
demonstrates how), it causes changes in some hidden cells in [NetAmt2], but
no non-hidden cells. Ergo, SUBTOTAL(109,...) correctly remains unchanged.
In contrast, I stumbled onto a value for C5 that changes non-hidden cells
(et al?). Ergo, SUBTOTAL(109,...) does change.

But when I change C5 to 6/1/12, I notice that the amounts in J109 and K109
do not change. They have the formulas =SUBTOTAL(109,[NetAmt]) and
=SUBTOTAL(109,[Sh Obl]).

Is that what you expect? Or are those the unchanging values that you really
want to discuss?
I'm glad that you were able to get Cell M209 to change. It does not update correctly for me.

All the cells in column M are dependent on C5. I am filtering 'out' all entries made after the cell in C5. You are right that not all value changes in C5 would result in a change in M209. But I'm never seeing an update. If I select C5 and put the insertion point in the formula and hit enter (that is force excel to consider that cell dirty)... it does update correctly.

What is truly bizarre is that this only happens when I add that column programatically... that is via VBA code. When I add the column by hand... exact same logic the subtotal does update correctly.

What version of excel are you checking this again. I suspect I may have stumbled across a weird bug in excel tables...but need to test weather this works correctly in other versions (or possibly in the same version but on a different install).

Thanks for the help! Sorry you are not able to repro scenario on your install.
  #4   Report Post  
Junior Member
 
Posts: 3
Default

Quote:
Originally Posted by DVEINTIMILLA View Post
I'm glad that you were able to get Cell M209 to change. It does not update correctly for me.

All the cells in column M are dependent on C5. I am filtering 'out' all entries made after the cell in C5. You are right that not all value changes in C5 would result in a change in M209. But I'm never seeing an update. If I select C5 and put the insertion point in the formula and hit enter (that is force excel to consider that cell dirty)... it does update correctly.

What is truly bizarre is that this only happens when I add that column programatically... that is via VBA code. When I add the column by hand... exact same logic the subtotal does update correctly.

What version of excel are you checking this again. I suspect I may have stumbled across a weird bug in excel tables...but need to test weather this works correctly in other versions (or possibly in the same version but on a different install).

Thanks for the help! Sorry you are not able to repro scenario on your install.
I was able to find a workaround. In the code creates the [NetAmt2] Column and adds the subtotal... I force excel to use relative cell references instead of using the structured table reference.

So the code changes the formula in M209 ....
from : "=SUBTOTAL(109,[NetAmt(2)])"
to : "=SUBTOTAL(109,R[-201]C:R[-1]C)"

This is a little kludgier, but it does the trick.
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
Update links not updating correctly Anthony Excel Discussion (Misc queries) 3 September 20th 07 04:46 PM
Subtotals not working correctly when 2nd subtotal added Pete Excel Worksheet Functions 1 January 18th 07 12:07 AM
Subtotal function is not working correctly Bryan Excel Discussion (Misc queries) 0 November 21st 06 05:09 PM
pivot tables not updating correctly Tom G. Excel Discussion (Misc queries) 0 September 6th 06 06:44 AM
Dynamic chart not updating correctly. Mike K Charts and Charting in Excel 0 July 5th 06 01:31 PM


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