ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How many nested statements is this? (https://www.excelbanter.com/excel-programming/362304-how-many-nested-statements.html)

[email protected]

How many nested statements is this?
 
I think there are 8...7 IF statements and then the AND/OR under them.
Any suggestions for rewriting this to fit under the limit. I can pull
the first IF into VBA code but the references get quite difficult and
lengthy...but it can be done.

=IF(OR(Update!RC3R10C,Update!RC4<R10C[-1]),0,
IF(Update!RC4=R10C[-1],1,
IF(AND(Update!RC3=R10C[-1],Update!RC4<R10C),Update!RC7,
IF(AND(Update!RC3<=R10C[-1], Update!RC4=R10C),R10C-Update!RC3,
IF(AND(Update!RC3<=R10C[-1],Update!RC4=R10C),R10C-R10C[-1],
IF(AND(Update!RC3<R10C[-1],Update!RC4<=R10C),Update!RC4-R10C[-1]+1,
IF(AND(Update!RC3=R10C[-1],Update!RC4R10C),R10C-Update!RC3,9999)))))))


Thanks,
John


[email protected]

How many nested statements is this?
 
If you are doing it in VBA, is there any reason to put the formula in,
why not just put the value?



All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com