Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Check if a cell contains text before continuing with formula

0

Hi, Once again I am trying to do something that should be simple but I can't figure it out myself and would appreciate any help you can give.

I have written the following simple formula

=IF(ISBLANK(F2),"Outstanding","Paid") in Column G to show the status of our invoices

This is a dynamically growing list of data from another worksheet.

What I can't figure out is how do a formula that will First check if there is anything in the First column (a) and if there isn't, then don't do anything, but if there is do the formula above.  

Since I have copied the formula above down multiple rows ready for when data is added I have a column full of "Outstanding" in the empty rows which is unsightly and annoying so I would love some help to sort this out.

Answer
Discuss

Discussion

@Dottj,

Have you tried what I have suggested?
If my suggestion solves things please mark my answer as selected. If not please provide some feedback so we can help you more.

Cheers.
WillieD24 (rep: 657) Jan 20, '25 at 10:35 am
@Dottj,

Thanks for selecting my answer.
WillieD24 (rep: 657) Jan 20, '25 at 1:53 pm
Add to Discussion

Answers

0
Selected Answer

Hi Dottj,

Sometimes the easy solution is right in front of us but we can't see it. I have been there myself - usually with VLOOKUP and I foret to include the arguement FALSE.

Your formula just needs to have another IF check added. Changed your formula to this:  =IF(ISBLANK(A2),"",IF(ISBLANK(F2),"Outstanding","Paid")) and then copy it down however many rowsyou need.

Note: ISBLANK(A2) and IF(A2="",) are not the same. ISBLANK returns TRUE if the cell contains nothing - no number, text, formula, or anything else; it returns FALSE if the cell does contain anything - number, text, formula, etc. If "A2" contains a formula ISBLANK will return FALSE and you will need to change your formula to: =IF(A2="", "", IF(ISBLANK(F2),"Outstanding","Paid"))

Cheers   :-)

Discuss

Discussion

@Dott - please check Willie's solution and, if correct, mark it as Selected. 

@Willie - that sounds like a good solution; good one! Hopefully Dott selects your Answer (and might ask another question to improve her sheet using Data Validation on the date column and/or using Conditionsl Formatting to autmatically highlight overdue items).
John_Ru (rep: 6612) Jan 17, '25 at 10:14 am
@John - Thanks John. Unfortunately Dottj hasn't provided enough info for me to be able to a more definitive answer. What info is in column "A"? Is it a hard-keyed entry or the result of a formula or macro? What info is in column "F"? Is it a hard-keyed entry or the result of a formula or macro? Hopefully Dottj will resond. (and mark my answer as selected)
WillieD24 (rep: 657) Jan 17, '25 at 11:27 pm
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login