Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DeeZi
 
Posts: n/a
Default need help w/ corresponding cells?


Sorry, first-timer here.

ex:

A B
1 2
2 5
3 8
4 3
5 1

if I want to display the max of B, I would do =max(B1:B5). But I want
the A that corresponds to this which would be 3 (the max of B column is
8, corresponding to 3 from A column).

I tried :

=INDEX(A2:A6,MATCH(MAX(B2:B6),B2:B6))

but this doesn't work on other formulas (if my B column were formulas).
Does anyone know how to get it to work w/ formulas?

Thanks in advance


--
DeeZi
------------------------------------------------------------------------
DeeZi's Profile: http://www.excelforum.com/member.php...o&userid=24805
View this thread: http://www.excelforum.com/showthread...hreadid=383637

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

How about...

=INDEX(A2:A6,MATCH(MAX(B2:B6),B2:B6,0))

That final 0 is very important.

DeeZi wrote:

Sorry, first-timer here.

ex:

A B
1 2
2 5
3 8
4 3
5 1

if I want to display the max of B, I would do =max(B1:B5). But I want
the A that corresponds to this which would be 3 (the max of B column is
8, corresponding to 3 from A column).

I tried :

=INDEX(A2:A6,MATCH(MAX(B2:B6),B2:B6))

but this doesn't work on other formulas (if my B column were formulas).
Does anyone know how to get it to work w/ formulas?

Thanks in advance

--
DeeZi
------------------------------------------------------------------------
DeeZi's Profile: http://www.excelforum.com/member.php...o&userid=24805
View this thread: http://www.excelforum.com/showthread...hreadid=383637


--

Dave Peterson
  #3   Report Post  
Alex
 
Posts: n/a
Default

DeeZi

(1) No need to apologise for trying to learn.
(2) Not straightforward for a first timer


This will work

=INDEX(A1:B5,MATCH(MAX(B1:B5),B1:B5,0),1)

The MAX(B1:B5) gets the maximum value [I assume values are in range A1:B5]
The MATCH(MAX(B1:B5),B1:B5,0) finds the row number of the max value within
the column B1:B5. The '0' denotes an exact match type.
The INDEX bit looks in the array A1:B5 to find the row number you specify
(done by the MATCH formula) and then picks the vlaue from column 1. This is
the '1' at the end of the formula.


Regards


Alex


"DeeZi" wrote:


Sorry, first-timer here.

ex:

A B
1 2
2 5
3 8
4 3
5 1

if I want to display the max of B, I would do =max(B1:B5). But I want
the A that corresponds to this which would be 3 (the max of B column is
8, corresponding to 3 from A column).

I tried :

=INDEX(A2:A6,MATCH(MAX(B2:B6),B2:B6))

but this doesn't work on other formulas (if my B column were formulas).
Does anyone know how to get it to work w/ formulas?

Thanks in advance


--
DeeZi
------------------------------------------------------------------------
DeeZi's Profile: http://www.excelforum.com/member.php...o&userid=24805
View this thread: http://www.excelforum.com/showthread...hreadid=383637


  #4   Report Post  
Chip Pearson
 
Posts: n/a
Default

Try

=INDEX(A2:A6,MATCH(MAX(B2:B6),B2:B6,0))


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"DeeZi"
wrote in message
...

Sorry, first-timer here.

ex:

A B
1 2
2 5
3 8
4 3
5 1

if I want to display the max of B, I would do =max(B1:B5). But
I want
the A that corresponds to this which would be 3 (the max of B
column is
8, corresponding to 3 from A column).

I tried :

=INDEX(A2:A6,MATCH(MAX(B2:B6),B2:B6))

but this doesn't work on other formulas (if my B column were
formulas).
Does anyone know how to get it to work w/ formulas?

Thanks in advance


--
DeeZi
------------------------------------------------------------------------
DeeZi's Profile:
http://www.excelforum.com/member.php...o&userid=24805
View this thread:
http://www.excelforum.com/showthread...hreadid=383637



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
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
Counting only active cells Sac73 Excel Discussion (Misc queries) 16 April 4th 05 05:49 AM
Locate and delete specific cells David Smith Excel Discussion (Misc queries) 1 January 19th 05 04:45 PM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 15th 05 11:14 PM
Convert data type of cells to Text,Number,Date and Time Kevin Excel Worksheet Functions 1 December 31st 04 12:57 PM


All times are GMT +1. The time now is 04:35 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"