#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Max Values

How do you extract max values from a row of data.

Ex.
product dist a dist b dist c dist d
a 5 3 9 1
b 8 7 1 3
c 1 4 6 9

to display like
Product most in stock
a dist c
b dist a
c dist d

Any help would be greatly appreciated
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Max Values

I set up your data as in your example and then inserted a new column B
with "Most in Stock" as the header in B1. Then put this formula in B2:

=INDEX(C$1:F$1,MATCH(MAX(C2:F2),C2:F2,0))

and copied down.

Hope this helps.

Pete

On Oct 10, 10:06 am, THFish wrote:
How do you extract max values from a row of data.

Ex.
product dist a dist b dist c dist d
a 5 3 9 1
b 8 7 1 3
c 1 4 6 9

to display like
Product most in stock
a dist c
b dist a
c dist d

Any help would be greatly appreciated



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Max Values

Alternatively, if you want the layout as in your example, then put the
headings for the lower table in A10:B10 and a, b, c in A11:A13 and
this formula in B11:

=INDEX(B$1:E$1,MATCH(MAX(B2:E2),B2:E2,0))

and copy this down into B12:B13.

Hope this helps.

Pete

On Oct 10, 10:06 am, THFish wrote:
How do you extract max values from a row of data.

Ex.
product dist a dist b dist c dist d
a 5 3 9 1
b 8 7 1 3
c 1 4 6 9

to display like
Product most in stock
a dist c
b dist a
c dist d

Any help would be greatly appreciated



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 523
Default Max Values

.... and then copy that formula down

"THFish" wrote:

How do you extract max values from a row of data.

Ex.
product dist a dist b dist c dist d
a 5 3 9 1
b 8 7 1 3
c 1 4 6 9

to display like
Product most in stock
a dist c
b dist a
c dist d

Any help would be greatly appreciated

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 523
Default Max Values

I'm assuming here that you have the value 'product' in cell A1 her...

Type the following in F2:

=if(max($b2:$e2)=b2,b$1,if(max($b2:$e2)=c2,c$1,if( max($b2:$e2)=d2,d$1,$e1)))

"THFish" wrote:

How do you extract max values from a row of data.

Ex.
product dist a dist b dist c dist d
a 5 3 9 1
b 8 7 1 3
c 1 4 6 9

to display like
Product most in stock
a dist c
b dist a
c dist d

Any help would be greatly appreciated



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Max Values

that worked perfectly. thank you

"Pete_UK" wrote:

I set up your data as in your example and then inserted a new column B
with "Most in Stock" as the header in B1. Then put this formula in B2:

=INDEX(C$1:F$1,MATCH(MAX(C2:F2),C2:F2,0))

and copied down.

Hope this helps.

Pete

On Oct 10, 10:06 am, THFish wrote:
How do you extract max values from a row of data.

Ex.
product dist a dist b dist c dist d
a 5 3 9 1
b 8 7 1 3
c 1 4 6 9

to display like
Product most in stock
a dist c
b dist a
c dist d

Any help would be greatly appreciated




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Max Values

Thanks for feeding back.

Pete

On Oct 10, 11:04 am, THFish wrote:
that worked perfectly. thank you



"Pete_UK" wrote:
I set up your data as in your example and then inserted a new column B
with "Most in Stock" as the header in B1. Then put this formula in B2:


=INDEX(C$1:F$1,MATCH(MAX(C2:F2),C2:F2,0))


and copied down.


Hope this helps.


Pete


On Oct 10, 10:06 am, THFish wrote:
How do you extract max values from a row of data.


Ex.
product dist a dist b dist c dist d
a 5 3 9 1
b 8 7 1 3
c 1 4 6 9


to display like
Product most in stock
a dist c
b dist a
c dist d


Any help would be greatly appreciated- Hide quoted text -


- Show quoted text -



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
Adding numerical values based on multiple values in another column Kazmaniac Excel Worksheet Functions 6 April 4th 07 08:53 PM
Advanced Filter for Values in Column M greater than Values in Colu SteveC Excel Discussion (Misc queries) 3 May 2nd 06 07:55 PM
Count unique values and create list based on these values vipa2000 Excel Worksheet Functions 7 August 5th 05 01:17 AM
create list of unique values from a column with repeated values? Chad Schaben Excel Worksheet Functions 1 July 8th 05 10:25 PM
Excel Compare values in columns & display missing values in a new cpetta Excel Discussion (Misc queries) 1 April 2nd 05 05:51 AM


All times are GMT +1. The time now is 04:19 PM.

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"