Trouble simplifying an IF formula

Beware Wet Paint

New Member
Joined
Jul 9, 2013
Messages
34
Hello lovely people,

I'm trying to write an IF formula which returns a certain value if a referenced cell contains any text and a different value if it is blank.

As it stands the only way I've been able to do this is to use a formula which nests each different possible text value the cells could contain- as there are numerous text values the cells could contain the resulting formula is rather long and complex.

I was wondering if there could be a different approach or an alternate function I could use to simplify this situation. Any suggestions are gratefully received, thank you.
 
Thank you for all the replies, I've had success using =IF(ISTEXT(A1),"","Mr Jones") but I will also be trying out the list option as I think =IF(ISTEXT(A1),"","Mr Jones") will become invalid if A1 contains a formula of it's own as I think the ISTEXT function recognizes a formula as text?

why don't you try the COUNTIF formula which gives you exactly what you need?
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Sorry, I'm very limited in my knowledge of functions but doesn't the COUNTIF function return a numerical value based on the specified criteria? I'm just thinking if I used COUNTIF it wouldn't give a text result? Forgive me if I'm incorrect, like I say my ignorance is shocking.
 
Upvote 0
Sorry, I'm very limited in my knowledge of functions but doesn't the COUNTIF function return a numerical value based on the specified criteria? I'm just thinking if I used COUNTIF it wouldn't give a text result? Forgive me if I'm incorrect, like I say my ignorance is shocking.

Enter the following in D1:D5 one by one:

Holiday
Part
Mat leave
LTS
SVR

Now invoke:

=IF(COUNTIF($D$1:$D$5,$A1),"","Mr Jones")

Try to test the formula for

A1 empty
A1 London
A1 =""
A1 SVR

in order to observe how it behaves.

The formula is equivalent to:

=IF(COUNTIF($D$1:$D$5,$A1)>0,"","Mr Jones")
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top