Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Getting max value

Status
Not open for further replies.

liltechy

Programmer
May 17, 2002
145
US
Hour 1 Hour 2 Hour 3 Hour 4 What Hour
5,487 5,298 5,208 5,186
3,853 3,666 3,444 3,236
3,756 3,569 3,440 3,387
5,478 5,279 5,172 5,109

I have and excel 2000 spreadsheet, a sample is shown above. With the information above I need to get the max value and put the Hour in the What Hour column. I think I need to use the Index function so that it would put the hour in the column, but I am lost after that. Pleas help.

liltechy
 
The max value per row ??
or the max value overall
for either of them, why can you not just use the MAX function ??

Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
 
Using your sample data, put this formula in cell E2 and copy down thru E5:
[blue]
Code:
  =INDEX($A$1:$D$1,1,MATCH(MAX(A2:D2),A2:D2,0))
[/color]

Change the test data so that the max value is not always in column "A" in order to see the effect.
 
aaaaaaaaaaaaaaaahhhhhh - I see (shouldn't go to the pub at lunch......hic ;-) )

Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
 
Zathras

That worked wonderfully. I appreciate it.

liltechy
 
Hi liltechy, just for info, if you like what you get, the usual practice in the group is to thank the person that gave you your solution by clicking on that lil ol "Mark this post as a helpful/expert post!" bit at the bottom of their answer. That gives the poster a bit of recognition for their help.

Best Wishes
Ken.................


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top