Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Returning a column name or number

After I find the max value in a row of numbers , how can I return the column
letter or column name in the next cell?
Thank You
--
Frank
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Returning a column name or number

With the Row of numbers in - say - C7:O7 then try:

=CHAR(63+COLUMN(C7)+MATCH(MAX(C7:O7),C7:O7,FALSE))

Note: if there is more than one MAX() value this will return the letter of
the column of the first one.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Frank" <satp wrote in message
...
After I find the max value in a row of numbers , how can I return the
column
letter or column name in the next cell?
Thank You
--
Frank



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Returning a column name or number

"Sandy Mann" wrote...
With the Row of numbers in - say - C7:O7 then try:

=CHAR(63+COLUMN(C7)+MATCH(MAX(C7:O7),C7:O7,FALSE) )

Note: if there is more than one MAX() value this will return the letter of
the column of the first one.

....

Doesn't work so well for ranges that extend to the right of column Z.

The ADDRESS function would make more sense here.

=SUBSTITUTE(ADDRESS(1,MIN(COLUMN(rng))-1+MATCH(MAX(rng),rng,0),4),"1","")

and, FWIW, this might work better in versions for languages that don't use
the Latin alphabet.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Returning a column name or number


--
Frank


"Sandy Mann" wrote:

With the Row of numbers in - say - C7:O7 then try:

=CHAR(63+COLUMN(C7)+MATCH(MAX(C7:O7),C7:O7,FALSE))

Note: if there is more than one MAX() value this will return the letter of
the column of the first one.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Frank" <satp wrote in message
...
After I find the max value in a row of numbers , how can I return the
column
letter or column name in the next cell?
Thank You
--
Frank


Sandy,

Please excuse my lack of understanding of C7:07
Assuming that in Row 2 I have values of 2,4,6,8 respectively in Columns
B,C,D,E and the Columns are labeled Able, Baker, Charlie, Dog and I use the
MAX function in the cell at Row 2 Column F to determine the highest value in
the row (8) what algorithm can I use to show in the next cell that the
highest value is in Column D or, better yet, under the name Dog
Thank You

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Returning a column name or number

"Frank" <satp wrote in message
...

--
Frank


"Sandy Mann" wrote:

With the Row of numbers in - say - C7:O7 then try:

=CHAR(63+COLUMN(C7)+MATCH(MAX(C7:O7),C7:O7,FALSE))

Note: if there is more than one MAX() value this will return the letter
of
the column of the first one.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Frank" <satp wrote in message
...
After I find the max value in a row of numbers , how can I return the
column
letter or column name in the next cell?
Thank You
--
Frank


Sandy,

Please excuse my lack of understanding of C7:07
Assuming that in Row 2 I have values of 2,4,6,8 respectively in Columns
B,C,D,E and the Columns are labeled Able, Baker, Charlie, Dog and I use
the
MAX function in the cell at Row 2 Column F to determine the highest value
in
the row (8) what algorithm can I use to show in the next cell that the
highest value is in Column D or, better yet, under the name Dog
Thank You



Column headers in the range B1:E1
Numeric values in the range B2:E2

=INDEX(B1:E1,MATCH(MAX(B2:E2),B2:E2,0))

Biff




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Returning a column name or number

Sincere Thanks to all who provided advice. Problem solved!
--
Frank


"T. Valko" wrote:

"Frank" <satp wrote in message
...

--
Frank


"Sandy Mann" wrote:

With the Row of numbers in - say - C7:O7 then try:

=CHAR(63+COLUMN(C7)+MATCH(MAX(C7:O7),C7:O7,FALSE))

Note: if there is more than one MAX() value this will return the letter
of
the column of the first one.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Frank" <satp wrote in message
...
After I find the max value in a row of numbers , how can I return the
column
letter or column name in the next cell?
Thank You
--
Frank


Sandy,

Please excuse my lack of understanding of C7:07
Assuming that in Row 2 I have values of 2,4,6,8 respectively in Columns
B,C,D,E and the Columns are labeled Able, Baker, Charlie, Dog and I use
the
MAX function in the cell at Row 2 Column F to determine the highest value
in
the row (8) what algorithm can I use to show in the next cell that the
highest value is in Column D or, better yet, under the name Dog
Thank You



Column headers in the range B1:E1
Numeric values in the range B2:E2

=INDEX(B1:E1,MATCH(MAX(B2:E2),B2:E2,0))

Biff



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
number range returning a text value jason New Users to Excel 3 June 15th 06 08:09 PM
Excel - returning column headers in a seperate column ExcelConfused Excel Discussion (Misc queries) 1 March 28th 06 02:49 PM
Returning value next to the nth occurrence of a particular number. daikontim Excel Worksheet Functions 4 February 21st 06 12:38 PM
Searching and returning row number of a value MikeDH Excel Worksheet Functions 1 August 9th 05 06:06 PM
Returning a value for a number in a range Derek Excel Discussion (Misc queries) 1 July 26th 05 04:47 PM


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