Dec 30 2023 09:54 AM
I currently have a formula to charge a fee for late payments. I'm currently using =IF(OR(N9 >0, O9 >0),75, 0): N9 being late payment and O9 being owed payment; however, I only need to charge the fee only if cell J9 is = to "No". J9 references a new customer. I've created a drop down to select yes or no for new customers but can't figure correct the formula to only calculate my first formula if J9 is = to "No". If J9 is = to "YES", I need the fee to be 0. How do I use an IF/OR/AND formula to say if J9=No, use =IF(OR(N9 >0, O9 >0),75, 0) but if J9=Yes, use 0?
Dec 30 2023 10:25 AM
Solution
First, just for the sake of readability, could I suggest that you stop using the awkward mixing of equal sign with words, as in
if cell J9 is = to "No"
That is logically exactly the same as either of the following
if cell J9 is "No" OR if cell J9="No"
but the redundancy gets in the way of that clarity.
All you really need to add is a first condition and its consequence,
if J9="Yes" then zero,
else your prior formula
As in =IF(J9="Yes",0,IF(OR(N9>0,O9>0),75,0))
That works because J9's is binary--has to be "Yes" or "No"--so the "No" condition is already covered by your prior formula.
Dec 30 2023 10:32 AM
Haha, very good call! I've been looking at this too long... You are the man! Thank you, sir!!
Dec 30 2023 10:25 AM
Solution
First, just for the sake of readability, could I suggest that you stop using the awkward mixing of equal sign with words, as in
if cell J9 is = to "No"
That is logically exactly the same as either of the following
if cell J9 is "No" OR if cell J9="No"
but the redundancy gets in the way of that clarity.
All you really need to add is a first condition and its consequence,
if J9="Yes" then zero,
else your prior formula
As in =IF(J9="Yes",0,IF(OR(N9>0,O9>0),75,0))
That works because J9's is binary--has to be "Yes" or "No"--so the "No" condition is already covered by your prior formula.