Today I’m writing about how to use multiselect picklists in an effective way using Salesforce or Excel.

The Business Problem

We took a survey of constituents. It integrated into Salesforce and populated a multi-select picklist. Let’s say that picklist was called “Fruits” and showed a survey participant’s favorite fruits.

First mistake was using a multi-select picklist! 😉
Report of results

This report is…okay. We can see that apples are popular by eyeballing the report. But when we try to count how many people selected each fruit, we run into a bit of an issue.

This is the stuff of nightmares.

So we need another way.

Two Solutions

We can solve this issue ~for free~ in two ways:

  1. The first method involves creating formula fields in Salesforce.
    1. Benefit: The data will always be current and accurate.
    2. Drawback: If you have many options and many multi-select picklists, you can run out of fields pretty quickly.
    3. Best for when: You don’t have lots of options, you need to see aggregated data in realtime (in a dashboard or report)
  2. The second method involves Excel.
    1. Benefit: You don’t waste Salesforce fields.
    2. Drawback: You have to do some periodic copying and pasting if you want live data; can’t create dashboards easily, etc.
    3. Best when: there are lots of options, the survey period is over, you just need raw data and don’t need dashboards

Solution 1: Salesforce Fields

The idea is to create a field for each multiselect picklist option, per this help article.

I created a formula checkbox field because they are visually appealing and can be summed easily. The formula is as follows:

if(includes( Fruits__c ,"Oranges"),true,false)

The result is something like this:

We would need one field for each answer choice.

Solution 2: Excel

The second option would be to export the results and use formulas in Excel to populate columns for each answer choice.

First, I export my report results to Excel.

Then, I find all of the multiselect options. I go to the field in Setup and click Printable View. I copy this list using Cmd/Ctrl+C.

Then, I create a new tab in my Excel spreadsheet. I paste the list into that tab.

Next, I go back to the original tab and use the Transpose function in cell C1 to list out the options horizontally across the header row.

=TRANSPOSE(Options!A2:A5)

Then I used a FIND formula in cell C2 to figure out if cell B2 had the word “Apples” in it. This is probably a total kludge, so if there’s a more efficient way to do it please let me know:

=IFERROR(IF(FIND(C$1,$B2)>0,1,0),0)

This is saying that if it finds the word “Apples” in the B column at any position (position > 0), return 1. If not, return 0. I used IFERROR because it gave me an error when nothing was found. This is probably because I am an Excel noob. But hey, it works.

The $’s are there so that I can drag the formula into the other columns and it will still work – the correct row and column “sticks” and other data is dynamic. So here’s the final product:

Now we can do cool stuff like sum them up per column and even create data visualizations.

How bout them apples?

Conclusion

These solutions turn something virtually unusable into something a little less unusable. Enjoy.

PS: I’m pretty sure another option would be to feed this data into Tableau and create formulas that way. But I don’t have Tableau. If someone wants to donate a license to me for the sake of the blog, LMK.