Thanks:  0
Likes:  0

# Thread: Formula for "If blank then A, if not blank then B"

1. ## Formula for "If blank then A, if not blank then B"

I have two columns in my spreadsheet. Column A has no blank fields, Column B has some blank fields. I would like to show the text from Column A in the same row of Column B only when Column B is blank.

So, basically I'm after: If column B has text, do nothing. If column B is blank, then list text from Column A.

Right now I've created Column C with this formula =IF(ISBLANK(B1), A1. That's working to get the text from A1 when B1 is blank. What can I do/add to get it pull the text from B1 if there is text there? Or...is there a better approach altogether?

2. ## Re: Formula for "If blank then A, if not blank then B"

Welcome to the forums!

Try:

=IF(ISBLANK(B1),A1,B1)

3. ## Re: Formula for "If blank then A, if not blank then B"

That works. Thank you so much.

I stumbled upon =IF(b1="",a1,IF(ISTEXT(b1),b1)) but like yours better because it's shorter.

Thanks again.

5. ## Re: Formula for "If blank then A, if not blank then B"

Originally Posted by MrKowz
Welcome to the forums!

Try:

=IF(ISBLANK(B1),A1,B1)
Thank you MrKowz! I'm a small biz owner, web dev, and I must say that MrExcel.com has saved my butt numerous times. Always great and courteous help from contributers. I truly appreciate your great advice, almost daily

~Stimpygato

6. ## Re: Formula for "If blank then A, if not blank then B"

A slight twist...

Looking for a calculation to occur if a cell is blank. The cells either have a date in them or nothing.

If B1 has a value then subtract B1 from A1

If B1 is blank the subtract today's date from A1

7. ## Re: Formula for "If blank then A, if not blank then B"

Try

=A1-IF(B1="",TODAY(),B1)

8. ## Re: Formula for "If blank then A, if not blank then B"

Originally Posted by Jonmo1
Try

=A1-IF(B1="",TODAY(),B1)
Thanks! Can I add a condition that if A1 is nothing occurs?

9. ## Re: Formula for "If blank then A, if not blank then B"

Thanks! Can I add a condition that if A1 is nothing occurs?
Can I add a condition that if A1 is empty, nothing occurs?

10. ## Re: Formula for "If blank then A, if not blank then B"

Try
=IF(A1="","",A1-IF(B1="",TODAY(),B1))

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•