VLookUp on multiple Rows with the same Value

memuench

New Member
Joined
Jan 19, 2018
Messages
4
Hello,
I am having Problems implement a VLookUp Function. I can't post the actual worksheet since it is confidential Company documents so I'll try to make a example here.

I got a Pivottable in Sheet 1 looking like this:

Col 1 Col 2 Col 3
ABB Development 5
ABB Product Support 10
ABB Beta Testing 15

Then I got a second Table in Sheet 2 looking like this:
Development Product Support Beta Testing
ABB


I think you already get the Point. I want the Values for the component ABB in the corresponding Category in Sheet 2. But here's the Problem: VLookUp will only search the first row with ABB. In Sheet 2 the Development Column always gets filled out with the correct number, but the rest doesn't since the Function obviously stops looking after finding the first row.

Anybody got an idea how to handle this?
Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi,

Take a look at the "GETPIVOTDATA function.
It will looks something like this:

See if this helps:


Book1
ABCD
6NameTypeSum of Total
7ABBBeta Testing15
8Development5
9Product Support10
10ABB Total30
11Grand Total30
12
13
14DevelopmentProduct SupportBeta Testing
15ABB51015
Sheet1
Cell Formulas
RangeFormula
B15=GETPIVOTDATA("Total",$A$6,"Name",$A15,"Type",B$14)
C15=GETPIVOTDATA("Total",$A$6,"Name",$A15,"Type",C$14)
D15=GETPIVOTDATA("Total",$A$6,"Name",$A15,"Type",D$14)
 
Last edited:
Upvote 0
Hi,

Take a look at the "GETPIVOTDATA function.
It will looks something like this:

See if this helps:

ABCD
6NameTypeSum of Total
7ABBBeta Testing15
8Development5
9Product Support10
10ABB Total30
11Grand Total30
12
13
14DevelopmentProduct SupportBeta Testing
15ABB51015

<colgroup><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B15=GETPIVOTDATA("Total",$A$6,"Name",$A15,"Type",B$14)
C15=GETPIVOTDATA("Total",$A$6,"Name",$A15,"Type",C$14)
D15=GETPIVOTDATA("Total",$A$6,"Name",$A15,"Type",D$14)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

I got a #REF Error. I used the following function:

=GETPIVOTDATA("Total";'[test.xlsx]testsheet'!$G$10;"Applic. area";A12709;"ProcOrg Cluster";"Product Support")

whereas Applic. Area is the Name in our example and A12709 the cell of the Name. ProcOrg Cluster is the Type and "Product Support" the word we are searching for
 
Upvote 0
Hi,

Means there's something wrong with the filled in fields and without looking at your file, i can't determine what.
I've linked my test model, take a look at my test model perhaps it helps you sort out what was wrong.
 
Last edited:
Upvote 0
Hi,

Means there's something wrong with the filled in fields and without looking at your file, i can't determine what.
I've linked my test model, take a look at my test model perhaps it helps you sort out what was wrong.

Hi Joris, I got it to work thanks to your formula.
Another question, I'm having a similar Problem now when wanting to extract data from a regular table (not a pivottable!). Is there a similar formula to what you posted since I can't use VLookUp (same values in rows again)

Thanks and BR
 
Upvote 0
Hi,

No there's no similar function to do so but there are more options than just using VLOOKUP.
If you can share a sample table and explain what your looking for. we can come up with a suitable solution for that as well.
 
Upvote 0

Forum statistics

Threads
1,214,535
Messages
6,120,090
Members
448,944
Latest member
sharmarick

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