Formula help wildcard text

MeaclH

Board Regular
Joined
Apr 2, 2014
Messages
63
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
G'day,

I need a formula to do the following.
If cell contains a value with the number "0" anywhere in the referenced cell, the number "1" is returned, and if it contains a value with the text "EDO" anywhere in the cell a ".5" is returned. If neither of these is found a 0 is returned.

Any help would be greatly appreciated

Thanks
Hayden
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hello, and what if a cell contains both 0 and "EDO" - what whould be returned then?
Hi there,
It would be unlikely/impossible in our current sheet set up for this to occur.

Actually while I think further, there may be some additional scenarios that would need to be counted.

Could you help with a formula for any of the following please?

If cell contains any of the following, 1 is returned

*0*
SDO
CDO
PHC

If cell contains “EDO”, .5 is returned.

For anything else, 0 is returned.

Thanks heaps
 
Upvote 0
Try this:

Excel Formula:
=LOOKUP(1,-SEARCH({"*","EDO","SDO","CDO","PHC","0"},A2),{0,0.5,1,1,1,1})
 
Upvote 0
Solution

Forum statistics

Threads
1,221,537
Messages
6,160,403
Members
451,644
Latest member
hglymph

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