Home > Enterprise >  Excel If with 3 conditions if cells are blank
Excel If with 3 conditions if cells are blank

Time:03-04

Cant seem to find a way to get this fully working. I have three columns A, B, C. If a cell in A is blank then it should show as "DMA" & if in B it should display " MSE Wall". Cells in C are a combination of A B. Now usually there are other values in Cells A & B so only if either cell of A or B is blank, cell C should be "DMA MSE Wall".

Heres what i got :

=IF(F1256="",E1256 &"MSE WALL",E1256&" "&F1256)

The above code will only get the below results :

1) A is blank   B is blank = MSE Wall
2) A = DMA   B is blank = DMA MSE Wall
3) A is blank   B = MSE Wall = MSE Wall

CodePudding user response:

Here is what I think you need. If you copy the following in C1 (or change the 1s to fit your needs for row number), then you should get

  • "DMA MSE Wall" when A1 or B1 is blank
  • a combination of A1 and B1 when both are populated. Note if you want to add a space between their content, you can do A1&" "&B1.

=IF(OR(A1="", B1=""), "DMA MSE Wall", A1&B1)

  • Related