If/then question [Closed]

Report
-
Posts
15614
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
May 15, 2021
-
Hello,

If a cell contains any text except for one specific word, I want to return that exact text. If a cell is empty I want to return nothing.

For example:

If there is any text in B1, I want to write a formula that displays that text in A1. If B1 doesn't contain any text, I want the formula to leave A1 blank.

Thanks for your help!

1 reply

Posts
2744
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
May 10, 2021
461
Hi Lmetz0804,

Here you go:
=if(B1="","",B1)

Best regards,
Trowa
Posts
15614
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
May 15, 2021
5
=IF('Project Schedule'!H7="1/0/00","",'Project Schedule'!H7)
(corrected : no double ")
>
Posts
15614
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
May 15, 2021

I think you're on the right track but I'm still getting an error. I'm playing around with it to see if I can figure it out.
Posts
15614
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
May 15, 2021
5
what is the difference between
=if(B1="","",B1)
and =B1
?
>
Posts
15614
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
May 15, 2021

Great question! =B1 returns a zero if the source cell is empty. I don't want the zero in B1, I just want and empty cell.
Posts
15614
Registration date
Sunday June 8, 2008
Status
Contributor
Last seen
May 15, 2021
5
=IF(or('Project Schedule'!H7="1/0/00",'Project Schedule'!H7=""),"",'Project Schedule'!H7)
or (nesting, as you suggested)
=IF('Project Schedule'!H7="1/0/00","",if('Project Schedule'!H7="","",'Project Schedule'!H7))

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!