Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Column Header Listing for highest value in a row

Thanks for anyone's help in advance . . .


A spreadsheet contains data in columns A-D, for 100 rows.
In row 1, a title for each column exists.
How do I have each row's Column E contain the column title for the cell in
that row that has the highest value?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default Column Header Listing for highest value in a row

Put this formula in E2 and fill down:
=OFFSET($A$1,0,MATCH(MAX(A2:D2),A2:D2,0)-1)

The MAX() portion finds the highest value in the row,
The MATCH() that it is wrapped in then uses the MAX value to get a relative
column number (from 1 to 4 in this case), but we need to subtract one from it
so that we can use it as the column offset value in the OFFSET() function.

Be sure to use the $ symbols where I did, and leave them out elsewhere.


"PZach18" wrote:

Thanks for anyone's help in advance . . .


A spreadsheet contains data in columns A-D, for 100 rows.
In row 1, a title for each column exists.
How do I have each row's Column E contain the column title for the cell in
that row that has the highest value?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Column Header Listing for highest value in a row

Hi

Alternatively you could use the non-volatile
=INDEX($A$1:$D$1,MATCH(MAX(A2:D2),A2:D2,0))

--
Regards

Roger Govier


"JLatham" <HelpFrom @ Jlathamsite.com.(removethis) wrote in message
...
Put this formula in E2 and fill down:
=OFFSET($A$1,0,MATCH(MAX(A2:D2),A2:D2,0)-1)

The MAX() portion finds the highest value in the row,
The MATCH() that it is wrapped in then uses the MAX value to get a
relative
column number (from 1 to 4 in this case), but we need to subtract one
from it
so that we can use it as the column offset value in the OFFSET()
function.

Be sure to use the $ symbols where I did, and leave them out
elsewhere.


"PZach18" wrote:

Thanks for anyone's help in advance . . .


A spreadsheet contains data in columns A-D, for 100 rows.
In row 1, a title for each column exists.
How do I have each row's Column E contain the column title for the
cell in
that row that has the highest value?

Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Column Header Listing for highest value in a row

JLatham, thanks for your help, I'm really close. . .

Now suppose that the data is located in columns AJ to AO. The way the
formula is currently set up, it is giving me the header for columns 1-4, just
like my example. How do I change that?

Thanks so much for your help!

"JLatham" wrote:

Put this formula in E2 and fill down:
=OFFSET($A$1,0,MATCH(MAX(A2:D2),A2:D2,0)-1)

The MAX() portion finds the highest value in the row,
The MATCH() that it is wrapped in then uses the MAX value to get a relative
column number (from 1 to 4 in this case), but we need to subtract one from it
so that we can use it as the column offset value in the OFFSET() function.

Be sure to use the $ symbols where I did, and leave them out elsewhere.


"PZach18" wrote:

Thanks for anyone's help in advance . . .


A spreadsheet contains data in columns A-D, for 100 rows.
In row 1, a title for each column exists.
How do I have each row's Column E contain the column title for the cell in
that row that has the highest value?

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Column Header Listing for highest value in a row

I figured it out. THANKS SO MUCH!

"JLatham" wrote:

Put this formula in E2 and fill down:
=OFFSET($A$1,0,MATCH(MAX(A2:D2),A2:D2,0)-1)

The MAX() portion finds the highest value in the row,
The MATCH() that it is wrapped in then uses the MAX value to get a relative
column number (from 1 to 4 in this case), but we need to subtract one from it
so that we can use it as the column offset value in the OFFSET() function.

Be sure to use the $ symbols where I did, and leave them out elsewhere.


"PZach18" wrote:

Thanks for anyone's help in advance . . .


A spreadsheet contains data in columns A-D, for 100 rows.
In row 1, a title for each column exists.
How do I have each row's Column E contain the column title for the cell in
that row that has the highest value?

Thanks!

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
macro unouwanme Excel Discussion (Misc queries) 9 August 31st 06 09:38 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
listing 1 of value in column of multiples Nigel Excel Discussion (Misc queries) 2 November 28th 05 04:40 PM
IF/AND/OR/DATEIF Issue...sorry...long post... EDSTAFF Excel Worksheet Functions 1 November 10th 05 12:28 AM
match and count words David Excel Worksheet Functions 5 July 4th 05 02:24 AM


All times are GMT +1. The time now is 01:24 AM.

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"