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

dkjonesau

New Member
Joined
May 9, 2014
Messages
47
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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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,224,823
Messages
6,181,171
Members
453,021
Latest member
Justyna P

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