Replace Header based on Max Value

prasud

New Member
Joined
Sep 18, 2014
Messages
2
Hi

I have the following problem. First Row is the Header[TABLE="width: 500"]
<tbody>[TR]
[TD]Name of Student[/TD]
[TD]Visual[/TD]
[TD]Auditory[/TD]
[TD]Kinesthetic[/TD]
[TD]Major Strand[/TD]
[TD]Name[/TD]
[/TR]
[TR]
[TD]Student 1[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]Kinesthetic[/TD]
[/TR]
[TR]
[TD]Student 2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]Auditory[/TD]
[/TR]
[TR]
[TD]Student 3[/TD]
[TD]5[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]Visual[/TD]
[/TR]
</tbody>[/TABLE]

In the above table, I will be filling all columns upto Kinestheti, and get the output of Maximum value in "Major Strand" ("=max(b2:d2)"). I want the "Name" column to automatically fill the header based on the value, as shown in the sample above.

I tried "=lookup(e2,b2:d2,b1:d1)" but it is working only if the values in the rows are in ascending order.

I would like to get a solution urgently. Please help.

Best regards
Prabhu Sukumaran
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Try,

If your data is from column A to E , In F2 try, drag down

=INDEX($B$1:$D$1,MATCH(E2,B2:D2,0))
 
Upvote 0

Forum statistics

Threads
1,226,498
Messages
6,191,377
Members
453,655
Latest member
lasvegasbuffet

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top