Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

Summarizing a column based on another multi select column

✭✭
edited 02/17/22 in Formulas and Functions

Hello - I have a column named "Monthly Hours" that lists hours (integers). I have another column called "Site of request" that lists the site(s). That column is multi-select. I would like to summarize hours spent per site. So, if the "Monthly Hours" column has a 10, and the "Site of request" lists "Site A" and "Site B", and if another row has 5 hours for just "Site A", then it would summarize 15 for A and 10 for B.

The ultimate goal here is to graph monthly hours per site.

Any ideas?

Thank you!

Best Answer

  • Community Champion
    Answer ✓

    Hi @Mark Hibyan

    I hope you're well and safe!

    Try something like this.

    =
    SUMIFS([Monthly Hours]:[Monthly Hours], [Site of request]:[Site of request], 
    HAS(@cell, "B"))
    

    Or (if you want to reference the Site in another column)

    =
    SUMIFS([Monthly Hours]:[Monthly Hours], [Site of request]:[Site of request], 
    HAS(@cell, Sites@row))
    

    Did that work/help?

    I hope that helps!

    Be safe and have a fantastic week!

    Best,

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

    Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. 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:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

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

Answers

  • Community Champion
    Answer ✓

    Hi @Mark Hibyan

    I hope you're well and safe!

    Try something like this.

    =
    SUMIFS([Monthly Hours]:[Monthly Hours], [Site of request]:[Site of request], 
    HAS(@cell, "B"))
    

    Or (if you want to reference the Site in another column)

    =
    SUMIFS([Monthly Hours]:[Monthly Hours], [Site of request]:[Site of request], 
    HAS(@cell, Sites@row))
    

    Did that work/help?

    I hope that helps!

    Be safe and have a fantastic week!

    Best,

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

    Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. 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:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

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

  • Thank you @Andrée Starå , that worked! I had been playing around with the syntax to no avail. Is there a way to dynamically do this, so that I don't have to create a summary field for each site and hard code the site name? The "Site of request" column is a multi select list for the end user, and there are 16 sites (that can change over time). I'm wondering if there's an easy way to just sum hours (in the "Monthly Hours" column) by site for each site selected, without having to hard code the site name, similar to how you would do it in a reporting tool?


    Thank you!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions

  • I'm trying to create a SUMIF formula that looks at the salesperson name in a column and adds up or totals their $ sales in another column. To ultimately show in Dashboard of Totals Sales by Salesperso…
    User: "Allan Z"
    Answered ✓
    9
    2
  • Good day Smartsheet Team, Getting an unparseable error on this formula: =IF($Name@row <> "",(SUMIFS({Expense}, {Period},1, {Type}, OR(@cell = "RES602782", @cell = "RES602497")),"") Trying to pull in a…
    User: "stratman"
    Answered ✓
    15
    2
  • I have a sheet that compiles all the responses from a form. The sheet has multiple start and end date columns, but only one start and one end date cell is NOT blank depending on the activity selected …
    User: "m_anderson"
    Answered ✓
    13
    2