Nested "If" Clauses
Nested "If" Clauses
(OP)
I would like to know how to put the following into an @if statement:
If b11=.0001, then I want B17, b19 and b21 all to be 0.0001 too.
This has to do with a spreadsheet where I can have up to four "groups". If I don't have one group, sadly, the variables force me to do division by "0". So, the best way is to put a 0.0001 into one cell and force the other cells into it too.
If b11=.0001, then I want B17, b19 and b21 all to be 0.0001 too.
This has to do with a spreadsheet where I can have up to four "groups". If I don't have one group, sadly, the variables force me to do division by "0". So, the best way is to put a 0.0001 into one cell and force the other cells into it too.





RE: Nested "If" Clauses
write the same if-clause in all four cells (use b$11 and you can copy the formula)
But this may be a misinterpetation of your problem? You want to exame the content in b11 and if 0.001 then "overwrite" the content of b17,b19..?
If yes then still simple - put your "original" value in a adjacant collumn (e.g. A)
then in the B collumn have this if clause:
=iif(b$11=.0001;0.0001;a17)
and copy this to then rest
all other cell must just have a =aXX formula
Best regards
Morten
RE: Nested "If" Clauses
If they are user inputs, you need to use the Data>Validation tool to restrict the input. SHould be straightforward.
If they are computed, you can use =MAX(your formula here, 0.0001). If the formula value is zero, 0.0001 would be used.
RE: Nested "If" Clauses
Can you give a little more information?
RE: Nested "If" Clauses
where al the "x" are, put your orginal formula in. the "" represents a blank cell.
RE: Nested "If" Clauses
=IF(A5=0,"A5 must be non-zero",B5/A5)
will display the result of division OR the message as required
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
Steam Engine enthusiasts: www.essexsteam.co.uk