![]() |
Match Question
Greetings!
I hope some expert or not so expert can help me with this question. I have a work book the three columns involved are D,E,R D2= ACETAMINOPHEN 500MG/15ML SOLN 240ML E2 = ACETAMINOPHEN R2= ACETAMINOPHEN 160 MG/5 ML I need to ensure R2 matches the name of the drug in either D2 or E2. Any help would be gratefully appreciated. Cheers, Jules |
Match Question
If drug name in R2 is always from first character to first blank i.e.
leftmot part of string with NO embedded blanks: Try .... =IF(ISNA(MATCH("*"&LEFT(R2,FIND(" ",R2,1)-1)&"*",D2:E2,0)),"No Match","Matched") HTH "Jules" wrote: Greetings! I hope some expert or not so expert can help me with this question. I have a work book the three columns involved are D,E,R D2= ACETAMINOPHEN 500MG/15ML SOLN 240ML E2 = ACETAMINOPHEN R2= ACETAMINOPHEN 160 MG/5 ML I need to ensure R2 matches the name of the drug in either D2 or E2. Any help would be gratefully appreciated. Cheers, Jules |
Match Question
You are a master! Thanks so much and thank you for your prompt response!
-- Jules "Toppers" wrote: If drug name in R2 is always from first character to first blank i.e. leftmot part of string with NO embedded blanks: Try .... =IF(ISNA(MATCH("*"&LEFT(R2,FIND(" ",R2,1)-1)&"*",D2:E2,0)),"No Match","Matched") HTH "Jules" wrote: Greetings! I hope some expert or not so expert can help me with this question. I have a work book the three columns involved are D,E,R D2= ACETAMINOPHEN 500MG/15ML SOLN 240ML E2 = ACETAMINOPHEN R2= ACETAMINOPHEN 160 MG/5 ML I need to ensure R2 matches the name of the drug in either D2 or E2. Any help would be gratefully appreciated. Cheers, Jules |
Match Question
Isn't a simpler way to do this: =IF(OR(R2=D2,R2=E2),"OK","Check drug name"))
?? Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "Toppers" wrote: If drug name in R2 is always from first character to first blank i.e. leftmot part of string with NO embedded blanks: Try .... =IF(ISNA(MATCH("*"&LEFT(R2,FIND(" ",R2,1)-1)&"*",D2:E2,0)),"No Match","Matched") HTH "Jules" wrote: Greetings! I hope some expert or not so expert can help me with this question. I have a work book the three columns involved are D,E,R D2= ACETAMINOPHEN 500MG/15ML SOLN 240ML E2 = ACETAMINOPHEN R2= ACETAMINOPHEN 160 MG/5 ML I need to ensure R2 matches the name of the drug in either D2 or E2. Any help would be gratefully appreciated. Cheers, Jules |
Match Question
Thanks Dave...that will work, but only if it is an exact match...
Thank you for the help. -- Jules "Dave F" wrote: Isn't a simpler way to do this: =IF(OR(R2=D2,R2=E2),"OK","Check drug name")) ?? Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "Toppers" wrote: If drug name in R2 is always from first character to first blank i.e. leftmot part of string with NO embedded blanks: Try .... =IF(ISNA(MATCH("*"&LEFT(R2,FIND(" ",R2,1)-1)&"*",D2:E2,0)),"No Match","Matched") HTH "Jules" wrote: Greetings! I hope some expert or not so expert can help me with this question. I have a work book the three columns involved are D,E,R D2= ACETAMINOPHEN 500MG/15ML SOLN 240ML E2 = ACETAMINOPHEN R2= ACETAMINOPHEN 160 MG/5 ML I need to ensure R2 matches the name of the drug in either D2 or E2. Any help would be gratefully appreciated. Cheers, Jules |
All times are GMT +1. The time now is 11:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com