![]() |
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 |
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 |
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. |
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 |
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 |
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 |
All times are GMT +1. The time now is 11:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com