Vlookup to report multiple instances of a reference

thc9001

New Member
Joined
May 3, 2011
Messages
8
I have 2 worksheets I am using to try to compare data. I was able to recall what it is I am looking for with a vlookup, however the vlookup only reports back the 1st instance that it found and I would like to see all instances.

I also was able to use a countif statement and that helped me to find out how many times that reference repeats.

Example:

Worksheet EAST
1 NAME
2 Applesauce
3 Bread
4 Breakfast Bread
5 Breakfast Entree
6 Breakfast Meat
7 Cheese, Cheddar
8 Cheese, Parmesan
9 Cold Beverage
10 Cold Cereal

so on and so forth until Row 96 (Yogurt)

Worksheet DC-CRL EAST
1 DIET COURSE NAME CRL NAME
2 Applesauce Bariatric Puree
3 Applesauce Bariatric Puree
4 Diet Kits Bariatric Puree
5 Diet Kits Bariatric Puree
6 Diet Kits Bariatric Puree
7 Entree Bariatric Puree
8 Entree Bariatric Puree
9 Gelatin Bariatric Puree
10 Gelatin Bariatric Puree
11 Hot Beverages Bariatric Puree

so on until...

469 Applesauce Dysphagia 1 Honey/Nectar
491 Applesauce Dysphagia 1 No Liquid

Until the last row...

1340 Vegetable zDiabetic 2600

Here are the 2 equations that I have used so far:

=COUNTIF('DC-CRL EAST'!$A$2:$A$1340,A2)

Results were:

Worksheet EAST
1 NAME
2 Applesauce 15
3 Bread 51
4 Breakfast Bread 19
5 Breakfast Entree 15
6 Breakfast Meat 0
7 Cheese, Cheddar 0
8 Cheese, Parmesan 0
9 Cold Beverage 3
10 Cold Cereal 19


=IF(ISNA(VLOOKUP(A2,'DC-CRL EAST'!$A$2:$B$1340,2,FALSE)),"None",(VLOOKUP(A2,'DC-CRL EAST'!$A$2:$B$1340,2,FALSE)))

Worksheet EAST
1 NAME
2 Applesauce Bariatric Puree
3 Bread Diabetic Adult: 5 Carb Meal
4 Breakfast Bread Diabetic Ped: 1000
5 Breakfast Entree Diabetic Adult: 3 Carb Meal
6 Breakfast Meat None
7 Cheese, Cheddar None
8 Cheese, Parmesan None
9 Cold Beverage Clear Liquid Ketogenic
10 Cold Cereal Diabetic Adult: 5 Carb Meal

What I am looking for is say for Applesauce to show me each of the 15 areas that it is used in, for example (Bariatric Puree, Bariatric Puree, Dysphagia 1 Honey/Nectar, Dysphagia 1 No Liquid, Dysphagia 1 Thin Liquid, Puree, etc.) or each of the 3 areas for Cold Beverage (Clear Liquid: Ketogenic, Clear Liquid: Ketogenic, Clear Liquid: Ketogenic).

Can someone please help me in putting together the right formula for this data? I have been reading the related forums on this and the equations written were a little complicated for me to breakdown and incorporate into my Excel File, so I figured let me post a thread and see what kind of creativity is out there.

If there is any other infromation that you need or would like to see the file please ask!

Thanks for your help. I am using Wndows XP and Excel 2003.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

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