+ Reply to Thread
Results 1 to 19 of 19

COUNTIF cells that are due within 2 weeks from today's date

  1. #1
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    COUNTIF cells that are due within 2 weeks from today's date

    I currently have a column with dates and I need to count how many dates are due within 2 weeks from today's date. The formula I have is =COUNTIF(Q11:Q1000,">="&(TODAY()+14))

    Today's date: March 20, 2013

    25-Jan-13 Overdue
    27-Mar-13 Due in 2 weeks
    2-Feb-13 Overdue
    22-Mar-13 Due in 2 weeks
    30-Mar-13 Due in 2 weeks
    20-Mar-13 Due in 2 weeks
    10-Jun-13
    15-May-13

    The answer that it is giving me is 2, but it should be 4.

    Please help. I've been trying to figure this out for 2 days!

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: COUNTIF cells that are due within 2 weeks from today's date

    The answer of 2 is correct for that formula as only two of the dates listed are greater than or equal to today's date +14 days.

    Try:

    =SUMPRODUCT(Q11:Q1000>=TODAY())*(Q11:Q1000<=TODAY()+14))
    If I've been of help, please hit the star

  3. #3
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: COUNTIF cells that are due within 2 weeks from today's date

    you need to do countifs. Right now you are just counting numebr of dates the occur AFTER or EQUAL to Today+14. YOu need to find the number of days AFTER today and BEFORE 14 days from today

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: COUNTIF cells that are due within 2 weeks from today's date

    Note, you wont be able to use the COUNTIFS formula mentioned above if you're using Excel 2003 as your profile information sates.
    (which is why I gave the SUMPRODUCT version).

  5. #5
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: COUNTIF cells that are due within 2 weeks from today's date

    Thanks Spencer101, but would you know the formula to count all the days that are coming up within 2 weeks of today's date?

  6. #6
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: COUNTIF cells that are due within 2 weeks from today's date

    I don't need to know 14 days before today's date. I just need to do a count of all dates that fall within 2 weeks of today's date.

    So if today's date is March 20, 2013, it'll count all dates that are in between March 20-April 3.

  7. #7
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: COUNTIF cells that are due within 2 weeks from today's date

    you can just add a column next to each date and put a 1 in it, then use the sumproduct to to sum the number of "1"s

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: COUNTIF cells that are due within 2 weeks from today's date

    Is there a way to do it without adding an additional column?

  9. #9
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: COUNTIF cells that are due within 2 weeks from today's date

    This formula =SUMPRODUCT(Q11:Q1000>=TODAY())*(Q11:Q1000<=TODAY()+14)) did not work and gave me a a #VALUE!
    Last edited by rowena229; 03-20-2013 at 02:12 PM.

  10. #10
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: COUNTIF cells that are due within 2 weeks from today's date

    here you go

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: COUNTIF cells that are due within 2 weeks from today's date

    that works I checked it. Its possible in your data you may not have it set up right? Are they all dates in the Q11:Q1000? Maybe attach the file?

  12. #12
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: COUNTIF cells that are due within 2 weeks from today's date

    Quote Originally Posted by jkj115 View Post
    here you go

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    thank you

  13. #13
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Thumbs up Re: COUNTIF cells that are due within 2 weeks from today's date

    Quote Originally Posted by jkj115 View Post
    here you go

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    thank you...it worked!!!

  14. #14
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: COUNTIF cells that are due within 2 weeks from today's date

    No problem - please mark as solved and if I helped you click star under this post under my name!

  15. #15
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: COUNTIF cells that are due within 2 weeks from today's date

    Quote Originally Posted by rowena229 View Post
    Thanks Spencer101, but would you know the formula to count all the days that are coming up within 2 weeks of today's date?
    That's what the SUMPRODUCT formula I provided does.

    =SUMPRODUCT((Q11:Q1000>=TODAY())*(Q11:Q1000<=TODAY()+14))

    Will count dates in column Q that are greater than or equal to today's date AND less than or equal to the date 14 days from now.

  16. #16
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: COUNTIF cells that are due within 2 weeks from today's date

    Quote Originally Posted by rowena229 View Post
    This formula =SUMPRODUCT(Q11:Q1000>=TODAY())*(Q11:Q1000<=TODAY()+14)) did not work and gave me a a #VALUE!
    Sorry, it was missing an opening bracket after SUMPRODUCT. MY bad.

  17. #17
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: COUNTIF cells that are due within 2 weeks from today's date

    Spencer - your original formula was missing parenthesis in beginning

  18. #18
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: COUNTIF cells that are due within 2 weeks from today's date

    Quote Originally Posted by jkj115 View Post
    Spencer - your original formula was missing parenthesis in beginning
    Thanks, I noticed that. I blame this iPad keyboard!

  19. #19
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: COUNTIF cells that are due within 2 weeks from today's date

    Quote Originally Posted by jkj115 View Post
    Spencer - your original formula was missing parenthesis in beginning
    Thanks, I noticed that. I blame this iPad keyboard!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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