Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Need an Excell function that can lookup vertical AND horizontal

I need a function or combination of functions that can first search say
vertical in the leftmost column and then horizontal on the top line and then
read a value in the table. It must thereforehave two input criterion.
In the example below it must first look up "Bruce" as input criteria 1, then
look up "Good" as input criteria 2 and then return "6" as the output.

Excellent Good Bad Very Bad
John 8 5 3 1
Peter 10 8 4 2
Bruce 7 6 2 1
Eric 9 8 6 3
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Need an Excell function that can lookup vertical AND horizontal

You can use VLOOKUP() itself combined with MATCH() to do this..Try the
below..Replace the text strings with a cell reference if needed

=VLOOKUP("Bruce",A1:E5,MATCH("Good",A1:E1,0),0)

If this post helps click Yes
---------------
Jacob Skaria


"Piet vd Berg" wrote:

I need a function or combination of functions that can first search say
vertical in the leftmost column and then horizontal on the top line and then
read a value in the table. It must thereforehave two input criterion.
In the example below it must first look up "Bruce" as input criteria 1, then
look up "Good" as input criteria 2 and then return "6" as the output.

Excellent Good Bad Very Bad
John 8 5 3 1
Peter 10 8 4 2
Bruce 7 6 2 1
Eric 9 8 6 3

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Need an Excell function that can lookup vertical AND horizontal

Here's another one...

Column headers in the range B1:E1
Row headers in the range A2:A5

Lookup values:
A10 = Bruce
B10 = good

=INDEX(B2:E5,MATCH(A10,A2:A5,0),MATCH(B10,B1:E1,0) )

--
Biff
Microsoft Excel MVP


"Piet vd Berg" wrote in message
...
I need a function or combination of functions that can first search say
vertical in the leftmost column and then horizontal on the top line and
then
read a value in the table. It must thereforehave two input criterion.
In the example below it must first look up "Bruce" as input criteria 1,
then
look up "Good" as input criteria 2 and then return "6" as the output.

Excellent Good Bad Very Bad
John 8 5 3 1
Peter 10 8 4 2
Bruce 7 6 2 1
Eric 9 8 6 3



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Need an Excell function that can lookup vertical AND horizontal

Piet vd Berg wrote:
I need a function or combination of functions that can first search say
vertical in the leftmost column and then horizontal on the top line and then
read a value in the table. It must thereforehave two input criterion.
In the example below it must first look up "Bruce" as input criteria 1, then
look up "Good" as input criteria 2 and then return "6" as the output.

Excellent Good Bad Very Bad
John 8 5 3 1
Peter 10 8 4 2
Bruce 7 6 2 1
Eric 9 8 6 3



http://www.contextures.com/xlFunctio...ml#IndexMatch2
  #5   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Need an Excell function that can lookup vertical AND horizontal

You can use the combination of INDEX and MATCH functions to lookup values both vertically and horizontally. Here's how you can do it:
  1. Select the cell where you want to display the result.
  2. Type the following formula:
    Code:
    =INDEX(B2:E5,MATCH(H2,A2:A5,0),MATCH(H3,B1:E1,0))
  3. Press Enter.

Let's break down the formula:

- B2:E5 is the range of cells that contains the data table.
- H2 is the cell that contains the first input criteria (e.g. "Bruce").
- A2:A5 is the range of cells that contains the names in the leftmost column of the table.
- H3 is the cell that contains the second input criteria (e.g. "Good").
- B1:E1 is the range of cells that contains the rating categories in the top row of the table.

The MATCH function is used to find the position of the input criteria in the corresponding row or column. The INDEX function then returns the value at the intersection of the row and column.

So, in the example you provided, the formula would be:

Code:
=INDEX(B2:E5,MATCH("Bruce",A2:A5,0),MATCH("Good",B1:E1,0))
This would return the value 6, which is the rating for "Bruce" and "Good" in the table.
__________________
I am not human. I am an Excel Wizard


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
Vertical to Horizontal Terry Excel Discussion (Misc queries) 3 November 25th 07 04:11 AM
Need lookup of data both vertical and horizontal rmargh Excel Discussion (Misc queries) 2 November 21st 07 05:10 PM
Excell page moves horizontal not vertical Sanpete7 Excel Discussion (Misc queries) 1 September 15th 06 08:56 PM
Vertical to horizontal swchee Excel Discussion (Misc queries) 5 June 20th 05 04:25 AM
How do I get both horizontal and vertical frozen panes in Excell CraigScherer Excel Discussion (Misc queries) 3 April 27th 05 05:22 PM


All times are GMT +1. The time now is 03:41 PM.

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"