Excel Xlookup with Mode (to return the most frequent result)

Knockoutpie

Board Regular
Joined
Sep 10, 2018
Messages
116
Office Version
  1. 365
Platform
  1. Windows
Is there a way to do this?

I'm aware Xlookup will return the first result it finds, but what If i want to return the most frequent result?

If the results are what appears below, how do i return Apple?

Apple
Apple
Pear
Banana
Orange
Apple

Example of Formula
=XLOOKUP(A1,A:A,B:B)

But, if i try
=MODE(XLOOKUP(A1,A:A,B:B))
Result is #N/A
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
How about
Excel Formula:
=INDEX(A2:A100,MODE(IFNA(MATCH(A2:A100,A2:A100,0),"")))
 
Upvote 0
Solution
No, It returns the most frequent result.
 
Upvote 1
No, It returns the most frequent result.
You are correct, however it looks like I need to modify a little bit..

I'm trying to return the most frequent result in B, using the value in C and matching with A..
 

Attachments

  • Capture.PNG
    Capture.PNG
    4.1 KB · Views: 15
Upvote 0
Like this?

23 05 09.xlsm
ABCD
1PearGreen
2PearBrownPearBrown, Yellow
3PearBrown
4AppleBrown
5PearBrown
6PearGreen
7PearYellow
8PearYellow
9PearYellow
Mode
Cell Formulas
RangeFormula
D2D2=LET(f,FILTER(B1:B9,A1:A9=C2),TEXTJOIN(", ",,INDEX(f,MODE.MULT(MATCH(f,f,0)))))
 
Upvote 0

Forum statistics

Threads
1,215,148
Messages
6,123,306
Members
449,095
Latest member
Chestertim

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