Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Excel Vlookup of multiple values

I am trying to lookup Ex: "JOE" in column A and return the value
corresponding to "JOE" in column B. The problem is that there are 5 "JOE"s
listed and I want to run formulas in five cells to show the 5 corresponding
values to "JOE" from column B. Any help with this would be appreciated.
--
Steve
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Excel Vlookup of multiple values

This is my answer to a similar question today. See if you can adapt it
With the text in B1, C1, D1, dates in A2:A3; data in B2:D4
date Aberdeen Celtic Rangers
23/11/2008 12000 52000 49000
24/11/2008 14000 45000 47000
25/11/2008 15000 65000 52000

In G1 enter the team to find: Rangers
In H1 locate its position in the list of teams with =MATCH(G1,B1:D1,FALSE) ;
this returns 3 since the team is in position 3
In G2 use =TODAY() and in H2 use =MATCH(G2,A2:A4,FALSE), this returns 3
since today's date in the third position
Locate the required data with =INDEX(B2:D4,H2,H1) This returns the expected
52000

Combine all this into one formula as
=INDEX(B2:D4,MATCH(TODAY(),A2:A4,FALSE),MATCH(G1,B 1:D1,FALSE))

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"airsg" wrote in message
...
I am trying to lookup Ex: "JOE" in column A and return the value
corresponding to "JOE" in column B. The problem is that there are 5
"JOE"s
listed and I want to run formulas in five cells to show the 5
corresponding
values to "JOE" from column B. Any help with this would be appreciated.
--
Steve



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Excel Vlookup of multiple values

=IF(ISERR(SMALL(IF(rngA="Joe",ROW(rngB)),ROWS($1:1 ))),"",INDEX(rngB,SMALL(IF(rngA="Joe",ROW(rngB)),R OWS($1:1))))

ctrl+shift+enter, not just enter
copy down as far as needed


"airsg" wrote:

I am trying to lookup Ex: "JOE" in column A and return the value
corresponding to "JOE" in column B. The problem is that there are 5 "JOE"s
listed and I want to run formulas in five cells to show the 5 corresponding
values to "JOE" from column B. Any help with this would be appreciated.
--
Steve

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Excel Vlookup of multiple values

The example assumes a unique identifier (date) which I do not have and my
data is layed out like this:
A B
AMY 5765
BOB 3234234
JOE 34256244
JOE 6687
JOE 86523
JOE 2789894

I am trying to return the values in multiple cells based on the input JOE
lets say in H1 of another sheet "sheet1"
JOE
34256244
6687
86523
2789894

Steve

--
Steve


"Bernard Liengme" wrote:

This is my answer to a similar question today. See if you can adapt it
With the text in B1, C1, D1, dates in A2:A3; data in B2:D4
date Aberdeen Celtic Rangers
23/11/2008 12000 52000 49000
24/11/2008 14000 45000 47000
25/11/2008 15000 65000 52000

In G1 enter the team to find: Rangers
In H1 locate its position in the list of teams with =MATCH(G1,B1:D1,FALSE) ;
this returns 3 since the team is in position 3
In G2 use =TODAY() and in H2 use =MATCH(G2,A2:A4,FALSE), this returns 3
since today's date in the third position
Locate the required data with =INDEX(B2:D4,H2,H1) This returns the expected
52000

Combine all this into one formula as
=INDEX(B2:D4,MATCH(TODAY(),A2:A4,FALSE),MATCH(G1,B 1:D1,FALSE))

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"airsg" wrote in message
...
I am trying to lookup Ex: "JOE" in column A and return the value
corresponding to "JOE" in column B. The problem is that there are 5
"JOE"s
listed and I want to run formulas in five cells to show the 5
corresponding
values to "JOE" from column B. Any help with this would be appreciated.
--
Steve




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Excel Vlookup of multiple values

Is the data sorted or grouped together like you sample shows?

--
Biff
Microsoft Excel MVP


"airsg" wrote in message
...
The example assumes a unique identifier (date) which I do not have and my
data is layed out like this:
A B
AMY 5765
BOB 3234234
JOE 34256244
JOE 6687
JOE 86523
JOE 2789894

I am trying to return the values in multiple cells based on the input JOE
lets say in H1 of another sheet "sheet1"
JOE
34256244
6687
86523
2789894

Steve

--
Steve


"Bernard Liengme" wrote:

This is my answer to a similar question today. See if you can adapt it
With the text in B1, C1, D1, dates in A2:A3; data in B2:D4
date Aberdeen Celtic Rangers
23/11/2008 12000 52000 49000
24/11/2008 14000 45000 47000
25/11/2008 15000 65000 52000

In G1 enter the team to find: Rangers
In H1 locate its position in the list of teams with
=MATCH(G1,B1:D1,FALSE) ;
this returns 3 since the team is in position 3
In G2 use =TODAY() and in H2 use =MATCH(G2,A2:A4,FALSE), this returns 3
since today's date in the third position
Locate the required data with =INDEX(B2:D4,H2,H1) This returns the
expected
52000

Combine all this into one formula as
=INDEX(B2:D4,MATCH(TODAY(),A2:A4,FALSE),MATCH(G1,B 1:D1,FALSE))

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"airsg" wrote in message
...
I am trying to lookup Ex: "JOE" in column A and return the value
corresponding to "JOE" in column B. The problem is that there are 5
"JOE"s
listed and I want to run formulas in five cells to show the 5
corresponding
values to "JOE" from column B. Any help with this would be
appreciated.
--
Steve








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Excel Vlookup of multiple values

Yes, the data is sorted in ascending alphabetical order.
--
Steve


"T. Valko" wrote:

Is the data sorted or grouped together like you sample shows?

--
Biff
Microsoft Excel MVP


"airsg" wrote in message
...
The example assumes a unique identifier (date) which I do not have and my
data is layed out like this:
A B
AMY 5765
BOB 3234234
JOE 34256244
JOE 6687
JOE 86523
JOE 2789894

I am trying to return the values in multiple cells based on the input JOE
lets say in H1 of another sheet "sheet1"
JOE
34256244
6687
86523
2789894

Steve

--
Steve


"Bernard Liengme" wrote:

This is my answer to a similar question today. See if you can adapt it
With the text in B1, C1, D1, dates in A2:A3; data in B2:D4
date Aberdeen Celtic Rangers
23/11/2008 12000 52000 49000
24/11/2008 14000 45000 47000
25/11/2008 15000 65000 52000

In G1 enter the team to find: Rangers
In H1 locate its position in the list of teams with
=MATCH(G1,B1:D1,FALSE) ;
this returns 3 since the team is in position 3
In G2 use =TODAY() and in H2 use =MATCH(G2,A2:A4,FALSE), this returns 3
since today's date in the third position
Locate the required data with =INDEX(B2:D4,H2,H1) This returns the
expected
52000

Combine all this into one formula as
=INDEX(B2:D4,MATCH(TODAY(),A2:A4,FALSE),MATCH(G1,B 1:D1,FALSE))

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"airsg" wrote in message
...
I am trying to lookup Ex: "JOE" in column A and return the value
corresponding to "JOE" in column B. The problem is that there are 5
"JOE"s
listed and I want to run formulas in five cells to show the 5
corresponding
values to "JOE" from column B. Any help with this would be
appreciated.
--
Steve






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Excel Vlookup of multiple values

Try this:

H1 = Joe

Enter this formula in H2 and copy down until you get blanks meaning all the
data has been extracted:

=IF(ROWS(H$2:H2)<=COUNTIF(A$1:A$6,H$1),INDEX(B$1:B $6,MATCH(H$1,A$1:A$6,0)+ROWS(H$2:H2)-1),"")

--
Biff
Microsoft Excel MVP


"airsg" wrote in message
...
Yes, the data is sorted in ascending alphabetical order.
--
Steve


"T. Valko" wrote:

Is the data sorted or grouped together like you sample shows?

--
Biff
Microsoft Excel MVP


"airsg" wrote in message
...
The example assumes a unique identifier (date) which I do not have and
my
data is layed out like this:
A B
AMY 5765
BOB 3234234
JOE 34256244
JOE 6687
JOE 86523
JOE 2789894

I am trying to return the values in multiple cells based on the input
JOE
lets say in H1 of another sheet "sheet1"
JOE
34256244
6687
86523
2789894

Steve

--
Steve


"Bernard Liengme" wrote:

This is my answer to a similar question today. See if you can adapt it
With the text in B1, C1, D1, dates in A2:A3; data in B2:D4
date Aberdeen Celtic Rangers
23/11/2008 12000 52000 49000
24/11/2008 14000 45000 47000
25/11/2008 15000 65000 52000

In G1 enter the team to find: Rangers
In H1 locate its position in the list of teams with
=MATCH(G1,B1:D1,FALSE) ;
this returns 3 since the team is in position 3
In G2 use =TODAY() and in H2 use =MATCH(G2,A2:A4,FALSE), this returns
3
since today's date in the third position
Locate the required data with =INDEX(B2:D4,H2,H1) This returns the
expected
52000

Combine all this into one formula as
=INDEX(B2:D4,MATCH(TODAY(),A2:A4,FALSE),MATCH(G1,B 1:D1,FALSE))

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"airsg" wrote in message
...
I am trying to lookup Ex: "JOE" in column A and return the value
corresponding to "JOE" in column B. The problem is that there are 5
"JOE"s
listed and I want to run formulas in five cells to show the 5
corresponding
values to "JOE" from column B. Any help with this would be
appreciated.
--
Steve








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLookup multiple values - sum returned values into single cell se7098 Excel Worksheet Functions 12 April 2nd 23 07:32 PM
vlookup on multiple values samuel Excel Worksheet Functions 3 May 7th 08 04:01 PM
Vlookup multiple values suraneniaditya Excel Worksheet Functions 4 March 7th 08 03:58 AM
how do i get multiple values in vlookup? pvuv Excel Worksheet Functions 3 February 1st 07 05:27 AM
vlookup, multiple values, sum values into one cell?? Phillips L Excel Worksheet Functions 4 November 9th 05 12:31 AM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"