Home > Mobile >  If 2 cells are blank (ISBLANK)
If 2 cells are blank (ISBLANK)

Time:05-01

I've got a formula to calculate average of two cells. If L4 is blank it gets J4. It works fine.

=IF(ISBLANK(L4), J4, IF(L4 = 0, J4, ((J4/2) (L4/2))))

But I need to add one more column to this formula. I need to calculate average of 3 cells.(lets say N4 to third column)

If N4 is empty it must get average of L4 and J4. If N4 and L4 are empty it must only get J4.

I've tried several things but no conclusion.

Thanks in advance

CodePudding user response:

You can write it as below... =IF(ISBLANK(N4), IF(ISBLANK(L4), J4, (J4/2 L4/2)), (J4/3) (L4/3) (N4/3))

If you are considering N4 = 0 and L4 = 0 the same as blank, you can add an OR condition as well like below

=IF(OR(ISBLANK(N4), N4=0), IF(OR(ISBLANK(L4), N4=0), J4, (J4/2 L4/2)), (J4/3) (L4/3) (N4/3))

  • Related