I appreciate any help anyone can offer.
Here is what I'm trying to do. I need to compare two worksheets with the goal of identifying all the occurances of data from one sheet and pulling it into another. Here is an abbreviated example.
ReferenceSheet
[TABLE="width: 500"]
<TBODY>[TR]
[TD][/TD]
[TD]A
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]acetaminophen 325mg tablet
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]acetaminophen 500mg tablet
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]acetaminophen 160mg/10.5ml Solution
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]doxepin 10mg capsule
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]doxepin 25mg capsule
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]dopamine IV infusion
[/TD]
[/TR]
</TBODY>[/TABLE]
WorkSheet
[TABLE="width: 500"]
<TBODY>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]acetaminophen
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]doxepin
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]dopamine
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]aspirin
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]
What I would like to see happen within the worksheet:
In Row 1, Column B, C, D-each of the three acetaminophen entries from reference table
In Row 2 Column B and C-each of the two doxepin entries from reference table
In Row 3 Column B-the Dopamine entry from reference table
In Row 4 column B-N/A
I have the following equation in the column B which will pull the first insance of the item into the file, but I don't know how to pull the multiple entries. Here is an example of the current formula I would have in worksheet cell B1
=INDEX('referencesheet'!$A$1:$a$5,MATCH("*"&Worksheet!A1&"*",'referencesheet'!$A$1:$A$5,0))
Here is what I'm trying to do. I need to compare two worksheets with the goal of identifying all the occurances of data from one sheet and pulling it into another. Here is an abbreviated example.
ReferenceSheet
[TABLE="width: 500"]
<TBODY>[TR]
[TD][/TD]
[TD]A
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]acetaminophen 325mg tablet
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]acetaminophen 500mg tablet
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]acetaminophen 160mg/10.5ml Solution
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]doxepin 10mg capsule
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]doxepin 25mg capsule
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]dopamine IV infusion
[/TD]
[/TR]
</TBODY>[/TABLE]
WorkSheet
[TABLE="width: 500"]
<TBODY>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]acetaminophen
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]doxepin
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]dopamine
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]aspirin
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]
What I would like to see happen within the worksheet:
In Row 1, Column B, C, D-each of the three acetaminophen entries from reference table
In Row 2 Column B and C-each of the two doxepin entries from reference table
In Row 3 Column B-the Dopamine entry from reference table
In Row 4 column B-N/A
I have the following equation in the column B which will pull the first insance of the item into the file, but I don't know how to pull the multiple entries. Here is an example of the current formula I would have in worksheet cell B1
=INDEX('referencesheet'!$A$1:$a$5,MATCH("*"&Worksheet!A1&"*",'referencesheet'!$A$1:$A$5,0))