+ Reply to Thread
Results 1 to 13 of 13

from date data counting how many dates fall in current week

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    from date data counting how many dates fall in current week

    Hi
    I have range of different dates in A2:A100
    I want to count how many dates fall under current week ( starting from Monday to Sunday)
    It also needs to update itself as per current year, month etc.
    I am looking for a formula.

    Any help please

    Kind regards

  2. #2
    Forum Contributor Steve N.'s Avatar
    Join Date
    12-22-2011
    Location
    USA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    298

    Re: from date data counting how many dates fall in current week

    Will the dates span more than one year or all be in the current year?

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: from date data counting how many dates fall in current week

    Hard to offer specific answers without seeing any data, but take a look at using =weeknum() to give you the week number of the year/date
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: from date data counting how many dates fall in current week

    Hi,

    I'm working on Excel 2010

    An attempt


    ------------------------------------------------------------------------------------------------

    =SUMPRODUCT(--(WEEKNUM(INDEX(A2:A100+0,),2)=WEEKNUM(TODAY(),2)))

    ------------------------------------------------------------------------------------------------

    Hope it helps

    Hope it helps
    Last edited by canapone; 11-03-2013 at 07:44 AM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: from date data counting how many dates fall in current week

    hi KK1234. for current week:
    =COUNTIFS(A2:A100,">"&TODAY()-WEEKDAY(TODAY(),2),A2:A100,"<="&TODAY()-WEEKDAY(TODAY(),2)+7)

    current year:
    =COUNTIFS(A2:A100,">="&"1jan"&YEAR(TODAY()),A2:A100,"<="&"31dec"&YEAR(TODAY()))

    current month:
    =COUNTIFS(A2:A100,">"&EOMONTH(TODAY(),-1),A2:A100,"<="&EOMONTH(TODAY(),0))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  6. #6
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Smile Re: from date data counting how many dates fall in current week

    Hi everyone,
    Really thanks for your reply.
    Solution by benishiryo is a perfect one and is interesting one.
    Solution by CANAPONE also works fine.
    I have click * for both as a expression of my gratitude.

    I have attached the workbook and there are certain question still need few answers and hope you will be able to offer help.
    Thanks to Steve N. and FDibbins for your prompt reply. Please have a look at the book and see if you can help as well.
    regards
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: from date data counting how many dates fall in current week

    Hi,

    in Q3 and below confirmed with control+shift+enter



    =IFERROR(INDEX($A$2:$A$366,SMALL(IF(WEEKNUM(INDEX($A$2:$A$366+0,),2)=WEEKNUM(TODAY(),2),ROW($A$2:$A$366)-1),ROWS($A$1:A1))),"")


    in order to get dates from list if weeknum is the same.


    Hope it helps
    Attached Files Attached Files
    Last edited by canapone; 11-03-2013 at 07:46 AM.

  8. #8
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: from date data counting how many dates fall in current week

    Hi CANAPONE ,
    Perfect solution my friend.

    It all now resolved.
    I am amazed, how quickly the solution is found.
    I will now study all the solutions and understand them.
    Great help in my learning.
    I have clicked* to express my gratitude.
    Thanks again.
    Regards

  9. #9
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Smile Re: from date data counting how many dates fall in current week

    Hi CANAPONE ,
    Perfect solution my friend.

    It all now resolved.
    I am amazed, how quickly the solution is found.
    I will now study all the solutions and understand them.
    Great help in my learning.
    I have clicked* to express my gratitude.
    Thanks again.
    Regards

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

    Re: from date data counting how many dates fall in current week

    Personally I would avoid using WEEKNUM because it only gives you partial weeks at the beginning and end of the year - so Tuesday 31st Dec 2013 would be deemed to be in a different week than Wed 1st Jan 2014. If you want those to be included as the same week then I'd go with benishiryo's solution
    Audere est facere

  11. #11
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: from date data counting how many dates fall in current week

    Hi again,

    I was about to write that I prefer Benishiro's solution too.

    Anyway, thanks for your generous feedback.

  12. #12
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: from date data counting how many dates fall in current week

    Hi daddylonglegs ,
    You are very right. I did try and then realized what you are saying.
    I will go for benishiryo's solution as well.
    Thanks again.
    regards

  13. #13
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: from date data counting how many dates fall in current week

    I wish I could give benishiryo another *
    I think you all are stars for me.
    Regards

+ 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. counting the number of dates that fall within a given week
    By john dalton in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-11-2013, 05:40 PM
  2. [SOLVED] Counting Dates that Fall in Specific Quarter
    By tylerf in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-19-2013, 03:30 PM
  3. [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
  4. Replies: 6
    Last Post: 02-02-2009, 01:57 PM
  5. Counting Dates that fall within a certain month
    By wnstar21 in forum Excel General
    Replies: 9
    Last Post: 01-26-2009, 12:24 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