Formula to retrieve most frequent number

JLC
JLC ✭✭✭✭✭✭
edited 12/09/19 in Formulas and Functions

Hi all,



I believe I'd use MODE for this in Excel but can't find an equivalent in Smartsheet. I need to build a formula to retrieve the most commonly found numbers from a column in a referenced sheet. Does anyone have a suggestion for how this can be done without MODE?

For example, if I have a column in another sheet that includes the following numbers, each in their own row:

19-001

19-001

19-008

19-001

19-002

 

The formula would produce "19-001". I would really love to avoid exporting to Excel as this is a metric we'd like to display on a Smartsheet dashboard.

Tags:

Comments

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    I would suggest a helper column in the original sheet that gives you the count of each number row by row such as

     

    =COUNTIFS([Column Name]:[Column Name], [Column Name]@row)

     

    You can then use an INDEX/MATCH or VLOOKUP to pull the data that is in the cell that has the highest count next to it.

  • I have found that countifs fails to work with index/match column formulas. How can I fix it?

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    Hi @Olga LaPlante

    Can you describe what happens in more detail or/and some screenshots? (Delete/replace any confidential/sensitive information before sharing) That would make it easier to help. (share too, [email protected])

    I hope that helps!

    Be safe and have a fantastic weekend!

    Best,

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    Did my post(s) help or answer your question or solve your problem? Please help the Community by marking it as the accepted answer/helpful. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:[email protected] | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • I am not sure what happened, the formulas I have used are vlookup and index/match. Sometimes they come up with "#no match".

    It looks as though the countif and sum formulas (as I just found out) choke if there is at least one “#no match” in the range. That it affects countif is weird since I specify the term to count. 

    So, I guess this is where I would stop for now.

    Thanks again!

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    @Olga LaPlante

    You're more than welcome!

    Just to make sure, is it working or not now?

    Remember! Did my post(s) help or answer your question or solve your problem? Please help the Community by marking it as the accepted answer/helpful. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:[email protected] | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • I am also trying to calculate MODE in a sheet summary field for data in a column titled DAYS TO REPORT. Values in that column range from 0 to 5 currently (but are continually changing). I'm trying to follow the workaround suggested above. I added a column MODE HELPER immediately after DAYS TO REPORT and added this formula =COUNTIFS([DAYS TO REPOR]:[DAYS TO REPOR], [DAYS TO REPOR]@row) to MODE HELPER. This appears to be working correctly and accurately identifies the total count for each number in the DAYS TO REPORT column. For example, there are 19 counts of 0, 17 counts of 1, 1 count of 2, 3 counts of 3, 3 counts of 5. I'm stuck on the next step, using the INDEX/MATCH or VLOOKUP formula as mentioned above. I've tried a variety of options that all resulted in "#unparseable". What is the formula that I would use to return the number in the DAYS TO REPORT column that corresponds to the rows with the highest count in the MODE HELPER column?

    Thank you!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!