I have a list of customers along with their purchases. I would like to see what are the most popular purchase combinations that customer make.
For example in this scenario, the most common is Apple and Orange with 3 customers ordering both.
I have a list of customers along with their purchases. I would like to see what are the most popular purchase combinations that customer make.
For example in this scenario, the most common is Apple and Orange with 3 customers ordering both.
You need to mock up an example of what you want. Just giving us the raw data is not enough.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Of course, sorry about that. See attached. I'm interested in anything that shows up more than once really, in order of most common.
Last edited by AliGW; 06-08-2022 at 08:35 AM. Reason: PLEASE don't quote unnecessarily!
That sounds like "market basket analysis". I know we've had previous conversations here over the years for market basket analysis type problems, and it seems like most of them have been some form of "find an outside utility/app/add-in that does it." If you are not required to program your own MBA algorithm from scratch, then that is probably the easiest. I even seem to recall seeing (for a past version of Excel 2013 I think) something like an optional Power-BI menu/ribbon that had a built in MBA tool integrated into Excel. If you have access to Power BI (or other third party tool), see how to use it to perform the analysis.
I'm not familiar with the algorithms behind MBA, so I would not be able to program it into the spreadsheet. I expect that, if it is necessary to program from scratch and you help us understand the algorithm, we should be able to help with the programming.
If it helps, I put "market basket analysis Excel" into my favorite search engine and this was the first of many hits: https://www.data-mania.com/blog/mark...ysis-in-excel/ Certainly not the only one, nor do I suggest it is the best tutorial, just the first in my results list. There are plenty of others if you want to search for them.
Originally Posted by shg
With possible combinations listed in D1:M2 and Customer Name in C3:C7,
D3=QUOTIENT(COUNTIFS(A2:A14,C3#,B2:B14,D1:M1)+COUNTIFS(A2:A14,C3#,B2:B14,D2:M2),2)
How to find the most common data combinations.png
This looks great, however it looks like you manually wrote the different possible combinations - D1:M2. Is that right? In the real data that I want to apply this to, there are 56 different products, rather than the 5 in this spreadsheet, so that wouldn't really be feasible.
Last edited by AliGW; 06-10-2022 at 05:40 AM. Reason: PLEASE don't quote unnecessarily!
A VBA-based solution using a "matrix" of similar concept as Josephteh formula solution.
Please Login or Register to view this content.
Last edited by JohnTopley; 06-09-2022 at 07:25 AM.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
Thanks. I've never used a VBA, so not sure how to apply this to my main spreadsheet.
Last edited by AliGW; 06-10-2022 at 05:40 AM. Reason: PLEASE don't quote unnecessarily!
First, there is no need to re-post (quote) the code: it is just "clutter" and wastes resource.
Second, post a fie which represents your actual file format [and anonymise any data]. The code can then be adjusted as needed.
Last edited by JohnTopley; 06-10-2022 at 05:43 AM.
Please try
With Lambda
Please Login or Register to view this content.
MS365 Insider
Please Login or Register to view this content.
Last edited by Bo_Ry; 06-10-2022 at 09:00 AM. Reason: corrected dynamic rows
Suppose that C2:C6 is List of fruits you have
Fruits
Apple
Orange
Grapefruit
Banana
Grapes
Formula to count the most common number of purchasing any both of fruits
Confirmed with CTRL+SHIFT+ENTERPlease Login or Register to view this content.
Good luck
Last edited by soledad; 06-15-2022 at 10:41 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks