Show me in which column corresponds the max value

Kwnstantinos_M

New Member
Joined
Jun 12, 2018
Messages
24
Hello,

I have 4 columns of data, like this:

NENWSESWPrevailing
45302231NE
25595142NW
71442118NE
952256SW

<tbody>
</tbody>

The first 4 columns contain numbers of wind data. In the fifth column I want to write a command, by which the name of the prevailing wind (namely the name of the column) will be returned as a result. For instance, in the 2nd row NE has the highest number, therefore NE is written in the fifth column etc. Do you have any ideas?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Let's say that your data is in the range A1:D5.
Then, place this formula in E2 and copy down to E5:
Code:
=INDEX($A$1:$D$1,MATCH(MAX(A2:D2),A2:D2,0))
 
Upvote 0
It returns the maximum value instead of the name of the column.. I want to return the name of the column corresponding to the maximum value. Do you know I mean? Instead of return the highest value, to show me NE or NW etc.
 
Upvote 0
It returns the maximum value instead of the name of the column.. I want to return the name of the column corresponding to the maximum value. Do you know I mean? Instead of return the highest value, to show me NE or NW etc.
I know exactly what you are saying, and if you follow my assumptions, it DOES, in fact, return the direction and not the number.
My guess if you edited my formula, and didn't do it properly.

Let me know the EXACT range your data appears in, and then let me know the exact formula you are using (and what cell you are placing it in).
 
Upvote 0
Yes you are right.. I made a mistake. Your command is perfect. Thank you very much, and I'm sorry.. my mistake! Thanks again!
 
Upvote 0

Forum statistics

Threads
1,216,783
Messages
6,132,683
Members
449,747
Latest member
OldMrsMol

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