COUNTIFS referencing date ranges specified in Sheet Summary

I'm trying to count the number of cells (dates) that fall between two dates that are selected in sheet summary. In excel I've been able to make this work

=COUNTIFS($C$7:$C$47,">="&$H$1,C7:C47,"<="&$H$2)

H1 and H2 being the relative date range I'm wanting to count between. I just don't know how to convert this into Smartsheet language. The relative date ranges (H1 & H2) would be in Sheet Summary.



Tags:

Best Answers

Answers

  • Lidiya S.
    Lidiya S. ✭✭✭
    edited 09/18/21

    Good morning @Jerry Alexander ,

    Smartsheet actually has a formula solution for this!

    =NETDAYS(start date,end date) *Counts total days between*
    
    =NETWORKDAYS(start date, end date ,[holidays]) *Counts business days between two dates*
    
    =NETWORKDAY(start date, end date,[holidays]) *Counts business days between two dates BUT adds 1 days if the start date is on a weekend*
    
    

    Hope this helps! Reach out with any other questions!

    Lidiya Shutaya

    lidiya@ddbconsultants.ca

  • Jerry Alexander
    Jerry Alexander ✭✭✭✭
    edited 09/18/21

    Thanks @Lidiya S. but Im wanting to count how many dates in the "Start" column (referenced in the sheet) fall between two date ranges (start date & end date) that are specified in sheet summary.

    For more context, Im a home builder and Im wanting to build a report showing how many houses we are starting per month, but Id like for it to be customizable to the specific months I'm calculating (which is why I can't use the MONTHS formula).

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    Answer ✓

    Hi @Jerry Alexander

    I hope you're well and safe!

    Try something like this.

    =COUNTIFS(Start:Start, >=[Start Date Month 1]#, Start:Start, <=[End Date Month 1]#)
    

    Did that work/help?

    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 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.

  • Jerry Alexander
    Jerry Alexander ✭✭✭✭
    edited 09/18/21

    Thanks @Andrée Starå That worked. A follow up to that, How would I total a Currency column that falls into the same date criteria? =SumIF..... start date falls between selected dates in sheet summary.

    In the screen shot I uploaded, it would be the Total Profit column.

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    edited 09/18/21 Answer ✓

    @Jerry Alexander

    Excellent!

    You're more than welcome!

    Try something like this for the Total Profit.

    =SUMIFS([Total Profit]:[Total Profit], Start:Start, >=[Start Date Month 1]#, 
    Start:Start, <=[End Date Month 1]#)
    

    Did that work?

    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.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!