Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Which Function to Use? Search an Array, Return a Row Value

I have an array of cells, B3:J34 on sheet2.

On sheet, 1, column, I have a range of values that can be found in the
array on sheet2. I'd like to put a function on column b, sheet1 to
return the value in row 2, above the searched value from sheet1 ,
column A. Does that make sense?

Basically, I want to search for a value within an array, and return
the value in row 2 when the searched value is located.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 150
Default Which Function to Use? Search an Array, Return a Row Value

Assuming that Sheet1!A2 contains the lookup value, try the following
formula that needs to be confirmed with CONTROL+SHIFT+ENTER, not just
ENTER...

=INDEX(Sheet2!$B$2:$J$2,MATCH(Sheet1!A2,INDEX(Shee t2!$B$3:$J$34,MIN(IF(Sh
eet2!$B$3:$J$34=Sheet1!A2,ROW(Sheet2!$B$3:$J$34)-ROW(Sheet2!$B$3)+1)),0),
0))

Note that if the source data contains more than one occurrence of the
lookup value, the value in Row 2 corresponding to the first occurrence
will be returned. For example, if H5 and D5 contain the lookup value,
the formula will return the value in H2.

Hope this helps!

In article .com,
wrote:

I have an array of cells, B3:J34 on sheet2.

On sheet, 1, column, I have a range of values that can be found in the
array on sheet2. I'd like to put a function on column b, sheet1 to
return the value in row 2, above the searched value from sheet1 ,
column A. Does that make sense?

Basically, I want to search for a value within an array, and return
the value in row 2 when the searched value is located.

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
Using INDEX function to return array row. RBI Excel Worksheet Functions 1 October 4th 06 03:21 PM
Return array from worksheet function Steve Lloyd Excel Worksheet Functions 4 July 19th 06 06:15 PM
Search array and return element No Ron Excel Worksheet Functions 7 May 17th 06 05:27 AM
Search a random array of cells and return a value of "X" EKB Excel Worksheet Functions 1 April 17th 06 03:57 AM
Use array to return array of values Brad Excel Worksheet Functions 2 March 30th 06 05:58 PM


All times are GMT +1. The time now is 02:39 AM.

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"