LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Find max and return corresponding value

On Tue, 13 Mar 2012 03:04:01 +0000, akhdiad wrote:


Hi all, I am a new member to this forum. I have an excel problem and I
hope all the experts in here can help me out.

A,B,C
Diameter,thickness,ID
762,25.4,1324
762,25.4,1325
660,19,1496
660,15.9,5000
762,35,1462
762,35,1464

Note: column separated by comma (,)

From the list, I would like to get two corresponding ID that would give
the max diameter with the corresponding max thickness. For example first
answer will be max diameter is (762) corresponding max thickness is (35)
and ID (1462). second answer will be max diameter is (762) corresponding
max thickness is (35) and ID (1464).

Thanks..


There are various methods to do this.

You could use an Advanced Filter; a VBA macro, or various formulas.

Here are some formulas. In the formulas below, Diameter refers to $A$2:$A$7; thickness and ID also refer to their respective columns.

**ASSUMPTIONS**
ID is numeric as it is in the data you present. If the ID is NOT numeric, the formula will need to be altered.
You are using a version of Excel that is 2007 or later. Again the formula will need to be altered if this is not the case.

This formula must be **array-entered**:

ID matching your criteria:
=IFERROR(LARGE(IF(thickness=MAX(IF(Diameter=MAX(
Diameter),thickness)),ID),ROWS($1:1)),"")
----------------------------------------

To **array-enter** a formula, after entering
the formula into the cell or formula bar, hold down
<ctrl<shift while hitting <enter. If you did this
correctly, Excel will place braces {...} around the formula.

If the above formula is in J2, then

Diameter corresponding to your criteria:
=IF(J2<"",MAX(Diameter),"")

thickness corresponding to your criteria:
=IFERROR(INDEX(thickness,MATCH(J2,ID,0)),"")

Finally, select the three cells and fill down as far as required.
 
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
Find and return a value Mrs. Robinson Excel Worksheet Functions 2 March 20th 09 01:17 PM
Find and Return kreffell Excel Discussion (Misc queries) 1 October 12th 07 02:36 PM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
find & return value Melissa Excel Discussion (Misc queries) 3 September 23rd 05 12:01 PM
what does .Find return Mark[_36_] Excel Programming 3 February 9th 04 02:37 PM


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