tiger3p

Feb 10 2012, 11:18 AM

Hello,

I'm trying to create a formula that will do the following:

IF cell A1 is not empty, then compare A1 to G1, if they're the same, return TRUE, if not return FALSE

IF cell A1 is empty, then compare B1 to G1, if they're the same, return TRUE, if not return FALSE

I have the following formula below but I'm getting incorrect data.

=IF(AND((AND(A1="",B153=G1)),"TRUE","FALSE"),IF((AND(A1<>"",A1=G1)),"TRUE","FALSE"))

Thanks for any help on this!

ipisors

Feb 10 2012, 11:20 AM

=IF(LEN(A1)>0,IF(A1=G1,"TRUE","FALSE"),IF(B1=G1,"TRUE","FALSE"))

StuKiel

Feb 10 2012, 11:22 AM

Hi,

Try this:

=IF(A1<>"",A1,B1)=G1

HTH

Stu

theDBguy

Feb 10 2012, 11:23 AM

Hi,

How about something like:

=IF(ISBLANK(A1),IF(A1=G1,TRUE,FALSE),IF(B1=G1,TRUE,FALSE))

Just my 2 cents...

EDIT: Oops... Sorry, I didn't see the previous replies before I posted. I like Stu's suggestion.

tiger3p

Feb 10 2012, 11:25 AM

Thanks so much! It works!