1

I want to use two formulas in one line. The aim is to sum two columns, A and B, in C with two conditions:

First, if cells in A or B are blank, then formula in column C will return blank.
Second, if B is greater than A, then leave cell blank.

Both formula should be used in the same cell simultaneously.

1

Try this (in C2):

=IF(OR(A2="",B2=""),"",IF(B2>A2,"",SUM(A2:B2)))

You can then fill this formula down column C.

1

You could check for 2 numbers with COUNT, e.g.

=IF((COUNT(A2,B2)=2)*(B2<=A2),A2+B2,"")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.