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 Get part of field name for highest value

Hello, I have a spreadsheet which looks like the following:
AF AG AH
PercentRegion1 PercentRegion2 PercentRegion3 <-- Column header
100 0 0
25 75 0
1 0 99

I would like to add another field which would be called "dominant region"
and would be populated with the region number of the highest percentage i.e.
1
2
3

Any help is appreciated
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Get part of field name for highest value

On Thu, 3 Dec 2009 11:31:01 -0800, Lorna_Jane
wrote:

Hello, I have a spreadsheet which looks like the following:
AF AG AH
PercentRegion1 PercentRegion2 PercentRegion3 <-- Column header
100 0 0
25 75 0
1 0 99

I would like to add another field which would be called "dominant region"
and would be populated with the region number of the highest percentage i.e.
1
2
3

Any help is appreciated


Since your regions are listed in order:

=MATCH(MAX(AF2:AH2),AF2:AH2,0)

If, on the other hand, you want everything after "region" in the column header,
then:

=MID(INDEX($AF$1:$AH$1,1,MATCH(MAX(AF2:AH2),AF2:AH 2,0)),
SEARCH("region",INDEX($AF$1:$AH$1,1,MATCH(MAX(AF2: AH2),AF2:AH2,0)))+6,99)

--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Get part of field name for highest value

In case of a tie for highest value, this formula will favor the lower number
(if 1 and 3 are tied, formula returns 1).

=MATCH(AF2:AH2,MAX(AF2:AH2),0)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Lorna_Jane" wrote:

Hello, I have a spreadsheet which looks like the following:
AF AG AH
PercentRegion1 PercentRegion2 PercentRegion3 <-- Column header
100 0 0
25 75 0
1 0 99

I would like to add another field which would be called "dominant region"
and would be populated with the region number of the highest percentage i.e.
1
2
3

Any help is appreciated

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
Format part of text in concatenated field jday Excel Worksheet Functions 4 October 27th 08 06:19 PM
Take part data from two fields and auto fill into 3rd field Kevin K Excel Worksheet Functions 1 August 26th 08 04:03 PM
How to make a field created a part of the Pivot Table Field List? drhell Excel Discussion (Misc queries) 0 January 29th 07 11:13 PM
how do I 'shadow rank' a number into a field it isn't a part of Greg Quinn Excel Worksheet Functions 1 October 17th 06 02:20 PM
Sum a $ amount in part of a field Sion Romaine Excel Discussion (Misc queries) 1 April 30th 05 05:23 AM


All times are GMT +1. The time now is 07:14 AM.

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"