vlookup vs Match+index

Giancar

Board Regular
Joined
Nov 29, 2017
Messages
52
Hi everyone,

I have 2 seperate table on 2 different sheet:
- a Cube Pivot Table
- a table that I paste from another source

Both table have a in Column A, an ID that is unique value for each row.
I need to merge these 2 table in a new table.

1st table (Cube pivot Table)
1000jackx2016Q2MAY
1001Jackb2016q2JUL
1003MARKX2018Q1JAN
1004CHLOEV2017Q3SEP
1005MELF2018Q1FEB

<tbody>
</tbody>


2nd table
1000Jack5 starsRussiaMoscow
1201
1341
1001
1100
1004CHLOE4 StarsChinaShangai

<tbody>
</tbody>


The result of this merge would like to have is the following
1000jack2016q2may5 starsRussiamoscow
1004chloe2017q3sep4 starsChinaShangai

<tbody>
</tbody>


I do not know how, but I managed to make a Vlookup of the 2nd table with following formula: (DATA is the name of the pivot Table)
=VLOOKUP(A2,DATA,3,0)
=VLOOKUP(A2,DATA,4,0)
=VLOOKUP(A2,DATA,5,0)

When I try to do the same for the Cube pivot data, formula is returning #N/A. I tried also with following formula but is returning 0
=IFERROR(INDEX(DATA,MATCH($A2,sheet1!$A:$A,0),2),0)

I tried to see if the formatting is the same but it looks that everything is fine.
Any help please?

Thank you in advance
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi,

In the place of DATA, you write the name of range (Column) where are the data.

=IFERROR(INDEX(Column,MATCH($A2,sheet1!$A:$A,0),2),0)

 
Upvote 0
The Index is looking at a different Table/Range than the Match?
 
Upvote 0
Hi,

#N/A was the result because one was a number and the other column wasn't. I just added a 0 to the Vlookup formula and I have solved the issue.
thank you
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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