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.

COUNTIF & WEEK

Hi All,

A client wants to be able to see how many calls were logged in thier current working week . However the working week begins on a Friday 00:00am and ends Thursday 11:59pm.

I'm after a formula to count all entries with the word "Aberdeen" in the Column called "Club" in the mentioned working week . This counter would then be reset when the new working week begins

I have the Count formula : =COUNTIFS(Club:Club, CONTAINS("Aberdeen", @cell))


I just need to include the Working Week range to the formaula .

Thankyou

Answers

  • ✭✭✭
    edited 02/15/24

    You need to modify the WEEKNUMBER() value based on the WEEKDAY() value.

    At the time of writing this email, we are Thu 15-Feb, real week 7. What will tomorrow (Friday) be in your mind, week 7 or week 8?

    If tomorrow is week 7:

    In Smartsheet, the week starts on Monday (Day 2), at least for me in Europe. For you it starts on Friday (Day 6). So in your logic, Day 6, 7 and 1 are "real week" and the next Day 2-5 are "real week"-1

    New week number =IF(OR(WEEKDAY(Date@row) > 5, WEEKDAY(Date@row) = 1), WEEKNUMBER(Date@row), WEEKNUMBER(Date@row) - 1)

    If tomorrow, we are already Week 8, then

    New week number =IF(OR(WEEKDAY(Date@row) > 5, WEEKDAY(Date@row) = 1), WEEKNUMBER(Date@row) + 1, WEEKNUMBER(Date@row))

    You can add this value to a new "Week" column and then count how many occurences of the call's week matches the same week number for the given Club.

    Something like:

    =COUNTIFS(Club:Club, Club@row, Week:Week, Week@row)

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