Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro | Excel Discussion (Misc queries) | |||
Need to Improve Code Copying/Pasting Between Workbooks | Excel Discussion (Misc queries) | |||
listing 1 of value in column of multiples | Excel Discussion (Misc queries) | |||
IF/AND/OR/DATEIF Issue...sorry...long post... | Excel Worksheet Functions | |||
match and count words | Excel Worksheet Functions |