Formula for most popular item per customer

mharri

New Member
Joined
Jul 30, 2018
Messages
9
Office Version
  1. 2019
Platform
  1. Windows
Hi
ABCDEF
1​
OrangeAppleGrapefruitBananaMost Popular
2​
Customer 12596Grapefruit
3​
Customer 23724Apple

This is a simplified version of a spreadsheet that has 2000 lines

What I'im looking for is a formula in Column F that will advise the most popular fruit for each Customer

Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Please make a bit more of an effort with your thread title in future. "Help" is really not at all useful. Thanks. :)
 
Upvote 0
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Assuming you have Excel 365 with FILTER function, then

20 07 16.xlsm
ABCDEF
1OrangeAppleGrapefruitBananaMost Popular
2Customer 12596Grapefruit
3Customer 23724Apple
4Customer 34244Orange, Grapefruit, Banana
Most Popular
Cell Formulas
RangeFormula
F2:F4F2=TEXTJOIN(", ",1,FILTER(B$1:E$1,B2:E2=MAX(B2:E2)))


If you don't have the FILTER function but do have TEXTJOIN, then try

20 07 16.xlsm
ABCDEF
1OrangeAppleGrapefruitBananaMost Popular
2Customer 12596Grapefruit
3Customer 23724Apple
4Customer 34244Orange, Grapefruit, Banana
Most Popular (2)
Cell Formulas
RangeFormula
F2:F4F2=TEXTJOIN(", ",1,IF(B2:E2=MAX(B2:E2),B$1:E$1,""))
 
Upvote 0
Apologies

I'm using Excel 2019, it doesn't have FILTER so i tried the TEXTJOIN option but that resulted in a #VALUE!. I've tried the online Excel which does have FILTER and that worked prefectly

Also tried the INDEX option and that worked as well

Apolgies for the bad subject tile and I have updated my profile



Thanks for your help
 
Upvote 0
As you are on 2019 you will need to confirm Peter's 2nd formula with Ctrl Shift Enter, rather than just Enter.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Sorry, forgot to mention the C+S+E entry. :oops:

Thanks for updating your profile though. (y)
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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