How to pick up second and third values using a vlookup??

bat18

Board Regular
Joined
Mar 29, 2010
Messages
89
I am trying to create a horizontal list of data, the problem is a vlookup will only give me the first bit of information that appears. I need a list of information.

data is along these lines

Name Time

Dave .567
John .897
Thom .987
John .876
John .765
Dave .987
John .908

So in another spreadsheet i have the names John, Dave and Thom down column A, I would like to pick up all the values associated with each name and list them across their particular row.

Hope this makes sense

Thanks
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I am trying to create a horizontal list of data, the problem is a vlookup will only give me the first bit of information that appears. I need a list of information.

data is along these lines

Name Time

Dave .567
John .897
Thom .987
John .876
John .765
Dave .987
John .908

So in another spreadsheet i have the names John, Dave and Thom down column A, I would like to pick up all the values associated with each name and list them across their particular row.

Hope this makes sense

Thanks
Try this...

Let's assume your data is on Sheet1 in the range A2:B8.

In the formulas I use these named ranges:
  • Names
  • Refers to: =Sheet1!$A$2:$A$8
  • Values
  • Refers to: =Sheet1!$B:$B
On Sheet2, in the range A2:A4 you have the unique names listed.

Enter this formula in B2. This will return a count for how many times each name is listed on Sheet1.

=COUNTIF(Names,A2)

Copy down to B4.

Enter this array formula** in C2. This will return the values from Sheet1 column B.

=IF(COLUMNS($C2:C2)>$B2,"",INDEX(Values,SMALL(IF(Names=$A2,ROW(Names)),COLUMNS($C2:C2))))

** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.

Copy down to C4 then across until you get a solid column of blank cells.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

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