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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
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,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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