Vlookup Problem

vivekshanghvi

New Member
Joined
Sep 14, 2006
Messages
36
Office Version
  1. 2007
Platform
  1. Windows
is it possible to look up multiple values from a table & get it one below the other.(reference is col A)
eg
Sheet 1
Col A Col B Col C
1 XYZ 4
1 ABC 5
1 PQR 6

i want Col C in sheet 2 using "1" as reference to look up & want to arrange 4, 5 & 6 in cell A1,A2 & A3
if any1 can help me..
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Try:

=IF(ROWS($A$1:A1)>COUNTIF(Sheet1!$A$1:$A$20,1),"",INDEX(Sheet1!$C$1:$C$20,SMALL(IF(Sheet1!$A$1:$A$20=1,ROW(Sheet1!$A$1:$A$20)),ROWS($A$1:A1))))

adjust ranges to suit.

confirm with CTRL+SHIFT+ENTER not just ENTER...you should see {} brackets around the formula.
 
Upvote 0
Sheet1
Book1
ABCD
1Field-1Field-2Field-3
21XYZ4
31ABC5
41PQR6
5
6
7
Sheet1


Sheet2
Book1
ABCD
11
23
3Result(s)
44
55
66
7 
Sheet2


A1: 1

which is the user-specified lookup value.

A2:

=COUNTIF(Sheet1!$A$2:$A$4,A1)

which determines the occurrence frequency of the lookup value.

A4:

=IF(ROWS($A$4:A4)<=$A$2,INDEX(Sheet1!$C$2:$C$4,SMALL(IF(Sheet1!$A$2:$A$4=$A$1,ROW(Sheet1!$A$2:$A$4)-ROW(Sheet1!$A$2)+1),ROWS($A$4:A4))),"")

which is confirmed with control+shift+enter (not with enter) then copied down.

Is this not the same thing as the one already posted? No, because:

1] It does not re-calculate the same thing many times.

2] It is robust against row insertions before the data on Sheet1. That is, it will always return the appropriate list.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,715
Members
448,985
Latest member
chocbudda

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