Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Help with lookup (vlookup)

I have a work book with 2 sheets in.

One has a listing of drugs.

Drug
Abacavir Sulfate
Abelcet
Abilify
Aciphex
Actinex

Other sheet has a database listing with a few columns as follows:

Description med rec Legend Date
ACCUZYME OINTMENT 6237 Y 2-Jun-07
ACCUZYME OINTMENT 6237 Y 24-Jun-07
ACETAMINOPHEN 325 6180 N 16-Jun-07
ACETAZOLAMIDE 250 6247 Y 15-Jun-07
ACETAZOLAMIDE 250 6247 Y 15-Jun-07
ACETAZOLAMIDE 250 6247 Y 20-Jun-07
ACULAR 0.5% EYE D 22216 Y 2-Jun-07
ADOXA PAK 1/150 M 6253 Y 20-Jun-07

What I'm trying to do is check to see if a drug from sheet one is included
in any of the test listing on shee 2 under description. The description also
includes other description besides the drug name. I would then like to
return the med rec# if the drug is found. Any heklp would be greatly
appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Help with lookup (vlookup)

davidio wrote...
I have a work book with 2 sheets in.

One has a listing of drugs.

Drug
Abacavir Sulfate
Abelcet

....
Other sheet has a database listing with a few columns as follows:

Description med rec Legend Date
ACCUZYME OINTMENT 6237 Y 2-Jun-07
ACCUZYME OINTMENT 6237 Y 24-Jun-07

....
What I'm trying to do is check to see if a drug from sheet one is
included in any of the test listing on shee 2 under description.
The description also includes other description besides the drug
name. I would then like to return the med rec# if the drug is
found. . . .


Looks like there could be several entries in the second table for the
same drug. Lookup formulas would return just one of the matching med
rec values. You might want to add another field showing the number of
matching records.

More troublesome would be if the entries in the first table may not
match the spelling of the drug in the second table. I'll assume that's
not the case, and the only problem you face is that the drugs listed
in the first table would be substrings of entries in the Description
field in the second table. I'll also add a count column to the first
table along with the med rec of the first match.

If the first table were in A2:A100,

B2 [count of matches in second table]:
=COUNTIF(INDEX(SecondTable,0,1),"*"&A2&"*")

C2 [first matching med rec, if any]:
=IF(B20,VLOOKUP("*"&A2&"*",SecondTable,2,0),"")

Fill B2:C2 down into B3:C100.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Lookup(), VLookup phil Excel Worksheet Functions 6 February 8th 07 01:06 AM
LOOKUP or VLOOKUP MichelleS Excel Worksheet Functions 9 October 20th 06 02:11 PM
Double lookup without using vlookup? HBF Excel Worksheet Functions 5 June 17th 06 11:02 PM
Lookup without VLOOKUP? J New Users to Excel 6 November 17th 05 06:57 AM
LOOKUP or VLOOKUP Bennie Excel Worksheet Functions 4 March 24th 05 07:45 PM


All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"