Partial Text Match

The Animal

Active Member
Joined
May 26, 2011
Messages
449
Hi
Have below that is supposed to work if "Casual" or "Part Time" is found as part of text in I17 but will only work if perfect match?
If Casual is found then it works but if "Casual after 3 months" it does not.

=IF(OR(I17="*Casual*",I17="*Part Time*"),AF17*AA17,AE17)

Any help would be great
Thanks Stephen
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try the OR like this

OR(ISNUMBER(SEARCH("Casual",I17)),ISNUMBER(SEARCH("Part Time",I17)))

M.
 
Upvote 0
Try:
Code:
=IF(OR(ISNUMBER(SEARCH("Casual",I17)),ISNUMBER(SEARCH("Part Time",I17))),AF17*AA17,AE17)
This is not case sensitive. If you want it case sensitive, replace SEARCH with FIND.
 
Last edited:
Upvote 0
Hi,

Another way using COUNTIF:

=IF(OR(COUNTIF(I17,"*Casual*"),COUNTIF(I17,"*Part Time*")),AF17*AA17,AE17)

Not case sensitive.
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,939
Members
449,094
Latest member
teemeren

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