Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Excel If with 3 conditions if cells are blank

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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)

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading