Forum Discussion

Militus's avatar
Militus
Copper Contributor
Dec 30, 2023
Solved

Using IF(AND formula based on another cell value

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 ...
  • mathetes's avatar
    Dec 30, 2023

    Militus 

     

    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.

Resources