SOLVED

Most common column

Copper Contributor

Hi!

 

I have the below table, and I would like on the last column: to return the column name of the cell with the highest number. If the highest number is in more than one column, it should show the list of those columns, like below:

 

NamePlaystationXboxSwitchPreferred Console
James Holden551Playstation, Xbox
Naomi Nagata351Xbox
Julie Mao000Playstation, Xbox, Switch
2 Replies
best response confirmed by Ugarte335 (Copper Contributor)
Solution

@Ugarte335 

It depends on which version of Excel you are, as variant

=TEXTJOIN(", ",1,FILTER($B$1:$D$1,B2:D2=MAX(B2:D2)))

 

@Ugarte335 

If you have Excel in Office 2019 or Microsoft 365, enter the following formula in E2 and confirm it with Ctrl+Shift+Enter to turn it into an array formula:

 

=TEXTJOIN(", ",TRUE,IF(B2:D2=MAX(B2:D2),$B$1:$D$1,""))

 

Fill or copy down.

1 best response

Accepted Solutions
best response confirmed by Ugarte335 (Copper Contributor)
Solution

@Ugarte335 

It depends on which version of Excel you are, as variant

=TEXTJOIN(", ",1,FILTER($B$1:$D$1,B2:D2=MAX(B2:D2)))

 

View solution in original post