• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Maximum match column

Pinang

Member
Hi,

I need to find maximum match from column and return column heading in result. Attached sample excel file with example.

Thanks in advance.
 

Attachments

  • Match from each group.xlsx
    10.1 KB · Views: 21
Hi @Pinang!

Check file, with this formula applied:
=IFNA(LOOKUP(1,0/(A2:D2=G2),A$1:D$1),"")

Blessings!
 

Attachments

  • Match from each group.xlsx
    11.2 KB · Views: 6
Another formula approach, criteria data may not be at the same row of Group Table, pls see below:

1] Define Name:

83910

2] In H2, formula copied down:

=IF(1-ISNA(MATCH(G2,INDEX(GroupTable,,MaxColNum),0)),INDEX(CroupHeader,MaxColNum),"")

3] See attachment

83909
 

Attachments

  • Match from each group (BY).xlsx
    12.8 KB · Views: 5
Similar defined names to @bosco_yip but using the most recent functions.
Code:
= BYROW(groupTbl=data, LAMBDA(crit,
    XLOOKUP(TRUE, crit, groupHdr, "", ,-1)
  ))
The matching headers are returned as a single dynamic range.
83921
 
Back
Top