Forum Discussion
if and ifs
Hi JohnF118 ,
can you post a data sample, so we can see what's in the cells referenced in the formula? Also mock up what result you would expect.
What does this formula do: =IFS(B18=0," ",B$8=0," ",C$8=0," ",TRUE,(B18/B$8))
if B18 equals zero, it returns a blank,
otherwise (i.e. if B18 is not zero), it checks the next condition, so
if B8 equals zero, it returns a blank,
otherwise, (i.e. if B8 is not zero either) it checks the next condition, so
if C8 equals zero, it returns a blank,
otherwise, (i.e. if C8 is not zero either) it checks the next condition, so
the next condition is the TRUE value and the function divides B18 by B8
Is that what you want to do?
Maybe you want to check all three cells and if any of them are zero, then return a blank, else do the division?
That means you need to combine the conditions with an OR() statement in a regular IF() function, like this
=IF(or(B18=0,B$8=0,C$8=0)," ",(B18/B$8))
If this is not it, what do you want to do? Can you describe the logic in words?