Solved Looking for a Value in a Cell

February 19, 2013 at 21:17:39
Specs: Windows 7
I am using the following formula below

=IF(OR(A1=" ",B1=" ",C1=" ",D1=" ")" ",G1)

What I am trying to do is if all the cells are blank I want to return a blank in the cell that the formula is in but any of the cells contains something then I want it to return the value in cell G1 it will work if all the cells are blank but it will not when one, two, or three, cells have value it is only when they all have a value in them that works as well but I said I need it to work when only one of the cell has a value in it
It’s dates that are in the cells A1,B1,C1,D1, I don't know if that will make a different.


See More: Looking for a Value in a Cell

Report •

February 20, 2013 at 04:37:02
✔ Best Answer
First, you seem to be missing a comma after the parenthesis for the OR function. I assume that's a typo.

The OR function is TRUE when any one or more of the arguments is TRUE. If you want the return a blank only when all of the cells are blank, then you need to use AND not OR.

The AND is TRUE only when all of its arguments are TRUE.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

February 20, 2013 at 06:19:15
In addition to what DerbyDad03 mentioned,
you are using the construct:

A1=" "

This is NOT checking for a Blank or Empty cell,
this is checking for a Single Space character

To check for a Blank Cell use: A1="" << Note no space between quotes.


Report •

February 23, 2013 at 03:28:01
Thanks for your help mmcconaghy and Derdydad03 I have been away so sorry for the late responce.

Thanks tomR

Report •

Related Solutions

Ask Question