Vlookup on lookup value which is placed on more than one row

a1b2c3d4

New Member
Joined
Sep 30, 2015
Messages
40
Office Version
  1. 365
Platform
  1. Windows
Summary.PNG
Detail.PNG

One employee id in 2nd image is spread into more than one column. I want them to be in a single row rather than in split rows. While applying vlookup in 1st image only the value of 1st row gets picked. For emp_key 559584 when I use regular vlookup then from 22nd data is blank in 1st row, so in this case I want lookup to identify and pick data from 2nd row till 23rd and from 24th lookup to identify from 3rd row and so on. Someone please assist.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,590
Office Version
  1. 365
Platform
  1. Windows
That's because it was written for what you originally showed, where a column would only have 1 value per Key, whereas the data you are showing now, has multiple values per column per key.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

a1b2c3d4

New Member
Joined
Sep 30, 2015
Messages
40
Office Version
  1. 365
Platform
  1. Windows
That's because it was written for what you originally showed, where a column would only have 1 value per Key, whereas the data you are showing now, has multiple values per column per key.
Hi Fluff, My apology, any solution to the later requirement will be great help. Thanks
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,590
Office Version
  1. 365
Platform
  1. Windows
Try this tweak to Jason's formula
Excel Formula:
=INDEX(FILTER(Sheet2!B$2:B$100,(Sheet2!$A$2:$A$200=$A2)*(Sheet2!B$2:B$200<>""),""),1)
 
Solution

a1b2c3d4

New Member
Joined
Sep 30, 2015
Messages
40
Office Version
  1. 365
Platform
  1. Windows
Dear Fluff, You and Jason had been of great help to me, thanks a lot for your extended support and patience all over the conversations, your last provided solution has worked successfully and yes please accept my apology for delayed response, as I couldn't check till date due to busy schedule. :)
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
77,590
Office Version
  1. 365
Platform
  1. Windows
Glad we could help & thanks for the feedback.
 

Forum statistics

Threads
1,175,752
Messages
5,899,276
Members
434,759
Latest member
carcharoth

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
Top