+ Reply to Thread
Results 1 to 5 of 5

Counting by Week and Month

  1. #1
    Forum Contributor
    Join Date
    03-05-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    301

    Counting by Week and Month

    Hi all,

    Please see my attached sheet. Forum Demo.xlsx

    I am counting activities that occur on a daily basis. I need to know for each week and month how often these activities occur

    I am currently using a basic =Sum(Cell:Cell), but this cannot work. My dates are displayed dynamically. i.e shows only activities for the past month (31 days), which throws out the sums when counting down the columns.

    Can someone please review and advise the best way of tackling this, and suggest a formula that might be useful. Note that a chart is the final result.

    Cheers

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Counting by Week and Month

    For week, I went with this in E2:

    =IF(AND(B2<>B3,B3<>""),SUMIF($B$2:$B$33,B2,$D$2:$D$33),"")

    and copied down

    For month, I did this in F2:

    =IF(AND(MONTH(A33)&YEAR(A33)<>MONTH(A34)&YEAR(A34),MONTH(A34)&YEAR(A34)<>""),SUMPRODUCT((MONTH(A33)&YEAR(A33)=MONTH($A$2:$A$33)&YEAR($A$2:$A$33))*($D$2:$D$33)),"")

    and copied down


    In your example, you're summing the weeknum and not the count amounts, so I was a little thrown off. I summed D. Change D as needed.
    Last edited by daffodil11; 02-10-2014 at 08:08 PM.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Contributor
    Join Date
    03-05-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    301

    Re: Counting by Week and Month

    Hi Daffodil and thanks for your very fast response.

    The week formula works perfectly. Brilliant.

    The month formula however doesn't seem to work correctly. I copied your formula in to F2, filled down and the end result was 18 in F2.

    I changed the starting dates but this only changed F2. Note that the dates wen over 2 months - part way through Jan, part way through Feb.

    Am I missing something?

    Thanks again for your assitance with this.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Counting by Week and Month

    Perhaps try this formula for F2 copied down

    =IF(DAY(A2+1)=1,SUMIF(A$2:A2,">"&A2-DAY(A2),D$2:D2),"")
    Audere est facere

  5. #5
    Forum Contributor
    Join Date
    03-05-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    301

    Re: Counting by Week and Month

    Awesome. Take a rep and thanks very much. Works perfectly!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Showing Fridays of each month in a 4 week month and a five week month
    By david_j_p in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-09-2013, 06:27 AM
  2. [SOLVED] Counting how many dates in a range fall into this week and last week
    By AneelK in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-08-2013, 09:38 AM
  3. Replies: 10
    Last Post: 01-22-2012, 10:05 AM
  4. Counting a Football Team's Record Week by Week
    By PASay1975 in forum Excel General
    Replies: 6
    Last Post: 09-05-2011, 11:16 AM
  5. Replies: 6
    Last Post: 02-02-2009, 01:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1