IF function that tests for any of one of several text strings

dkjonesau

New Member
Joined
May 9, 2014
Messages
46
Hi all,

I've got a bit of a conundrum.

I have a cell that I want to fetch a value from pasted data, only if an adjacent cell doesn't contain one of a list of possible text strings from the pasted data.
Here's a snapshot.
1713256751038.png


Currently C12 & D12 fetch their time from R & S if R isn't blank.

I want to add an IF in front of that so that if T contains any of the text strings highlighted in yellow from the =UNIQUE summary of possible values in column T, the time isn't fetched.

For example if T12 contained Recall or Single Day off, despite there being a time in R12 it would not transfer to C12 as would currently occur via the =IF(ISBLANK(R12),"",R12) that currently fetches it.

I know how to use an IF to stop one if one string is present. I was trying to avoid a long and complex nested IF.

Is there a way of adding the strings that are exclusion criteria to a range and then IF searching the range? Or am I stuck with nesting IF's?

Thanks

Dave
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
That’s the cause of the issue. Why not use a table or dynamic range?
 
Upvote 0
Solution
Ok. Think I fixed it.

Made the named range Exclude a dynamic range using formula in range definition -
Excel Formula:
=Sheet1!$AP$11:INDEX(Sheet1!$AP:$AP,MATCH("zzzzzzz",Sheet1!$AP:$AP,1))

Cheers, thanks for that.

DJ
 
Upvote 0

Forum statistics

Threads
1,215,218
Messages
6,123,676
Members
449,116
Latest member
HypnoFant

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