Find max value in a data set but assign new value to result

Occasional Contributor

Hi everyone,


I'm using windows 10 and office 365.


I was hoping you could help me to change the output of a max function. I'm trying to use a formula that would assign a value of 1/2/3 to the ouput depending on if the highest value is in column A/B/C. For example:



Where the final column would have the formula creating the results of the max from the 3 others. 


I hope this somewhat makes sense.


Thanks for any help! 

6 Replies
you can use:


As variant


@Sergei Baklan 

Nice, it's so easy to forget the MAX/MIN capabilities of XMATCH and its elder sibling XLOOKUP. 

so it is interesting. you can also use:
=XMATCH(,range,-1) as long as all the values are numeric values but any text>number and blank is > text
but it appears you can use:
=XMATCH("",range,-1) as any text or blank is > "" and therefore only a number will be found