![]() |
Conditional calculation?
Hello,
Am curious as to whether it is possible to conditionally calculate (and re-calculate) a worksheet? For example: 1) a column contains a formula that simply adds the value in the preceeding row to the value in the left adjacent cell, that is just a cumulative total. 2) at a specified cumulative value, the value is reset to (say) zero but only once. 3) when this event occurs, a 'flag' value is set in a worksheet cell (say in the right adjacent cell) Is it possible to preserve this flag value? Tthat is, set it once and not re-set it? I hope that this make sense! Regards, Geoff. |
Conditional calculation?
Hi
Do you mean something like this: =IF(AND(B5+C4=4,COUNTIF($C$1:$C4,0)=0),0,B5+C4) This will create a running total in column C of values in column B. When the total reaches 3, it will reset to 0 and then carry on, without resetting. Is that close to what you want? Andy. wrote in message oups.com... Hello, Am curious as to whether it is possible to conditionally calculate (and re-calculate) a worksheet? For example: 1) a column contains a formula that simply adds the value in the preceeding row to the value in the left adjacent cell, that is just a cumulative total. 2) at a specified cumulative value, the value is reset to (say) zero but only once. 3) when this event occurs, a 'flag' value is set in a worksheet cell (say in the right adjacent cell) Is it possible to preserve this flag value? Tthat is, set it once and not re-set it? I hope that this make sense! Regards, Geoff. |
Conditional calculation?
Hi,
Thanks for your reply. I tried your suggestion and got the following: B C 1 1 2 1 1 3 1 2 4 1 3 5 1 0 6 1 1 7 1 2 Unfortunately, once the "zero" condition is met, it causes the condition checking to re-start. What I am really after is a way to "store" or "set" a variable/constant in Excel that, once set, remains set until actively un/re-set. As an old DOS person, I see it as just like a DOS environment variable. Any ideas? Geoff. |
Conditional calculation?
Hi
That's exactly what my response was supposed to do!! I obviously misunderstood your post. What do you want to use your variable/constant for - once set? In the example you posted back - what output would you expect to see? Andy. wrote in message oups.com... Hi, Thanks for your reply. I tried your suggestion and got the following: B C 1 1 2 1 1 3 1 2 4 1 3 5 1 0 6 1 1 7 1 2 Unfortunately, once the "zero" condition is met, it causes the condition checking to re-start. What I am really after is a way to "store" or "set" a variable/constant in Excel that, once set, remains set until actively un/re-set. As an old DOS person, I see it as just like a DOS environment variable. Any ideas? Geoff. |
All times are GMT +1. The time now is 01:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com