Vlookup based on an IF function - Help Needed!

Jimmy67

New Member
Joined
Sep 12, 2013
Messages
8
Hi

This is tricky to explain so please bare with me but I have lots of data in the description column A below and I want to perform a search that says, if any of the cells in column A contain any of the medicines in column H, then return the relevant job code from column I.

So for example on the second line, there is water for injection in column A. I am hoping someone can give me a formula that will bring back job code "XRNEPPIM" from column I based on "Water" in column H. I hope that makes sense. Any help appreciated as have been trying different formulas and not getting anywhere. Thanks :)

1701815399908.png
 

Attachments

  • 1701815289149.png
    1701815289149.png
    94.5 KB · Views: 8

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try:

Book2
ADEFGHI
1DescriptionJobJob descriptionProductJob Code
2M12 ACCRUE TPS STOGARE CHARGES#N/APRALIDOXIMEXRNEPEPM
3XXN12590103-SERVICE-3627608 - Water for Injection BP, 10ml PlastiXRNEPPIMPROPOFOLXRNEPICU
4AUTO GENERATED#N/APROPOVENXRNEPICU
5XXN11596699-SERVICE-LOT 1 - Storage Charges for RELENZA Qty 500XRNEPPIMPRPSXRNEPEPM
6PRUSSIIANXRNEPEPM
7RELENZAXRNEPPIM
8REMIFENTANILXRNEPICU
9ROCURONIUMXRNEPICU
10SOD CHLORXRNEPPIM
11TAMIFLUXRNEPPIM
12WATERXRNEPPIM
13
Sheet3
Cell Formulas
RangeFormula
D2:D5D2=LOOKUP(2,1/SEARCH($H$2:$H$12,A2),$I$2:$I$12)
 
Upvote 1

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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