Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Lookup value with multipe Results

I am using the following formula and have tried numerous variations with no
luck.

=INDEX($P$3:$S$2500,SMALL(IF($P$3:$P$2500=$A3,ROW( $P$3:$P$2500)),ROW($1:$1)),4)

I am trying to find the value in Cell A3 and return results from the array
of column P through S. The value that is in Cell A3 will match a value in
column P. I want to return the result from column S.


Basically Cell A3 = TEST1, Cell P24, P25, P50 = Test1, and Cell S24, S25,
S50 = 94, 92, 88 (respectively)

When I use the above formula I should be able to return the first result
then modify the formula and return the second result and so on? I am not sure
what I am missing or if I am on the right track. Any ideas? Thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Lookup value with multipe Results

You got it ALMOST right...

Use this in the cell you want the first value
=INDEX($P$1:$S$2500,SMALL(IF($P$1:$P$2500=$A$3,ROW ($P$1:$P$2500)),ROW(1:1)),4)
and press CTRL-SHIFT-ENTER
then copy down

I changed $P$3 to $P$1 since you are counting the rows from 1....

Also changed ROW($1:$1) to ROW(1:1) since you want it to be ROW(2:2) in the
second row.

"John" wrote:

I am using the following formula and have tried numerous variations with no
luck.

=INDEX($P$3:$S$2500,SMALL(IF($P$3:$P$2500=$A3,ROW( $P$3:$P$2500)),ROW($1:$1)),4)

I am trying to find the value in Cell A3 and return results from the array
of column P through S. The value that is in Cell A3 will match a value in
column P. I want to return the result from column S.


Basically Cell A3 = TEST1, Cell P24, P25, P50 = Test1, and Cell S24, S25,
S50 = 94, 92, 88 (respectively)

When I use the above formula I should be able to return the first result
then modify the formula and return the second result and so on? I am not sure
what I am missing or if I am on the right track. Any ideas? Thanks


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Lookup value with multipe Results

Also changed $A3 to $A$3 since you want to find the match for the same value.

"John" wrote:

I am using the following formula and have tried numerous variations with no
luck.

=INDEX($P$3:$S$2500,SMALL(IF($P$3:$P$2500=$A3,ROW( $P$3:$P$2500)),ROW($1:$1)),4)

I am trying to find the value in Cell A3 and return results from the array
of column P through S. The value that is in Cell A3 will match a value in
column P. I want to return the result from column S.


Basically Cell A3 = TEST1, Cell P24, P25, P50 = Test1, and Cell S24, S25,
S50 = 94, 92, 88 (respectively)

When I use the above formula I should be able to return the first result
then modify the formula and return the second result and so on? I am not sure
what I am missing or if I am on the right track. Any ideas? Thanks


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default Lookup value with multipe Results

I want to be able to drag the formula down the sheet to search for A3 then A4
then A5 so an so on. Wont this lock it up and not allow that number to
change? Also if I want the second answer to show up in the cell to the right
of the first what makes that work? The first formula is working great by the
way. Thanks

"Sheeloo" wrote:

Also changed $A3 to $A$3 since you want to find the match for the same value.

"John" wrote:

I am using the following formula and have tried numerous variations with no
luck.

=INDEX($P$3:$S$2500,SMALL(IF($P$3:$P$2500=$A3,ROW( $P$3:$P$2500)),ROW($1:$1)),4)

I am trying to find the value in Cell A3 and return results from the array
of column P through S. The value that is in Cell A3 will match a value in
column P. I want to return the result from column S.


Basically Cell A3 = TEST1, Cell P24, P25, P50 = Test1, and Cell S24, S25,
S50 = 94, 92, 88 (respectively)

When I use the above formula I should be able to return the first result
then modify the formula and return the second result and so on? I am not sure
what I am missing or if I am on the right track. Any ideas? Thanks


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default #NUM! Error with lookup

I think I found a work around for the previous question I am now using the
formula below which changes the referenced cell as I autofill down. However I
am getting #NUM! on some cells where there is no data found. I thought I put
no errors in the formula. Anyhelp?


=IF(ISERROR(INDEX($P$1:$S$2500,SMALL(IF($P$1:$P$25 00=$A3,ROW($P$1:$P$2500)),ROW($1:$1)),4)),"",(INDE X($P$1:$S$2500,SMALL(IF($P$1:$P$2500=$A3,ROW($P$1: $P$2500)),ROW($5:$5)),4)))


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Lookup value with multipe Results

match a value in column P.... return the result from column S.

Try this robust version:

Assume you want the results starting in cell U3.

Enter this array formula** in U3 and copy down until you get blanks meaning
all data has been extracted:

=IF(ROWS(U$3:U3)<=COUNTIF(P$3:P$20,A$3),INDEX(S$3: S$20,SMALL(IF(P$3:P$20=A$3,ROW(S$3:S$20)),ROWS(U$3 :U3))-MIN(ROW(P$3:P$20))+1),"")

If your data to be returned in numeric then you can use a less complex
formula that will return the results in either ascending or descending
order:

For ascending order:

=IF(ROWS(U$3:U3)<=COUNTIF(P$3:P$20,A$3),SMALL(IF(P $3:P$20=A$3,S$3:S$20),ROWS(U$3:U3)),"")

For descending order just replace SMALL with LARGE.

** 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.

--
Biff
Microsoft Excel MVP


"John" wrote in message
...
I am using the following formula and have tried numerous variations with no
luck.

=INDEX($P$3:$S$2500,SMALL(IF($P$3:$P$2500=$A3,ROW( $P$3:$P$2500)),ROW($1:$1)),4)

I am trying to find the value in Cell A3 and return results from the array
of column P through S. The value that is in Cell A3 will match a value in
column P. I want to return the result from column S.


Basically Cell A3 = TEST1, Cell P24, P25, P50 = Test1, and Cell S24, S25,
S50 = 94, 92, 88 (respectively)

When I use the above formula I should be able to return the first result
then modify the formula and return the second result and so on? I am not
sure
what I am missing or if I am on the right track. Any ideas? Thanks




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
Lookup Results UlvaZell Excel Discussion (Misc queries) 1 September 26th 08 03:48 AM
lookup from multipe cells cmccurdy23 Excel Discussion (Misc queries) 1 February 1st 07 09:06 PM
Inconsistent results with =LOOKUP? watkincm Excel Worksheet Functions 2 May 31st 06 08:21 PM
using multipe source data to plot on one chart tom zane Charts and Charting in Excel 1 March 17th 06 10:52 PM
How do I statistically analyze data across multipe worksheets? Ottomatic New Users to Excel 3 January 19th 06 09:41 PM


All times are GMT +1. The time now is 09:25 AM.

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

About Us

"It's about Microsoft Excel"