+ Reply to Thread
Results 1 to 15 of 15

Today + 30 Days

  1. #1
    Registered User
    Join Date
    10-12-2015
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    12

    Today + 30 Days

    Hello all. I've been combing through the forums a lot today and I've found similar topics...but I still just can't get this formula to function the way I need it to.

    I need for Cell G3 to formulate the number of dates within Cell Range G8:G500 that will expire within 30 days of the current date.

    I was trying "COUNTIF(G8:G500,"<"&TODAY()+30)" but to no avail. I've tried a few versions of this formula but...nope.

    I don't know if this is contributing to the problem or not but there is some Conditional Formatting in Column G that highlights dates that are past "NOW" (Red Highlight) and dates that are due to expire within 30 days (Yellow Highlight).

    Any assistance would be greatly appreciated!

    Thanks!

  2. #2
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Today + 30 Days

    Hi -

    Try this:

    =COUNTIF($G$8:$G25,"<"&(TODAY()+30))
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  3. #3
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Today + 30 Days

    One other thing I noted is the date in Cell G8 has an extra dash after it, so it is treated as text, not a date. You should confirm all of your dates are actually entered as real dates (i.e., Excel date serial numbers).

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,912

    Re: Today + 30 Days

    Try


    =COUNTIFS($G$8:$G4501,">="&TODAY(),$G$8:$G4501,"<"&TODAY()+30)

    Dates >= Today and <= Today+30

  5. #5
    Registered User
    Join Date
    10-12-2015
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    12

    Re: Today + 30 Days

    That did it! Thank you, John! Man...I was tearing my hair out. Thank you, thank you, thank you!

  6. #6
    Registered User
    Join Date
    10-12-2015
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    12

    Re: Today + 30 Days

    Thanks for your reply loginjmor! I tried it but it didn't work. That extra dash by the date was just a typo as I quickly switched the actual data so I could post it online. Nice catch though! Thank you so much!

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,912

    Re: Today + 30 Days

    It's too late: brain hurts!!!
    Last edited by JohnTopley; 05-27-2016 at 04:19 PM.

  8. #8
    Registered User
    Join Date
    10-12-2015
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    12

    Re: Today + 30 Days

    Really? It worked on the first try. I tested it with dates before, during and after the time-frame set and it functioned perfectly. Think I should try this other formula instead?

  9. #9
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Today + 30 Days

    I think the logic works either way John. Mathematically, Today()+30 <= Expiry is the same as Today() <= Expiry - 30 You're just moving the 30 to the other side of the equation.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,912

    Re: Today + 30 Days

    Yes ..... Senior moment!!! It's OK. Apologies for the confusion.

  11. #11
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Today + 30 Days

    Haha! No problemo! I do that all the time.

    By the way, thanks for the Rep Pulgasari!

  12. #12
    Registered User
    Join Date
    10-12-2015
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    12

    Re: Today + 30 Days

    haha! :o) At least you know what you're doing! I've been with this thing for a few hours now. Ugh.

  13. #13
    Registered User
    Join Date
    10-12-2015
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    12

    Re: Today + 30 Days

    Absolutely! If you can guys can take the time to help a stranger, I can take the time to thank you for it! Cheers!

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,912

    Re: Today + 30 Days

    My thanks too for the rep but I think I'll quit now (today) while I am ahead!

  15. #15
    Registered User
    Join Date
    10-12-2015
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    12

    Re: Today + 30 Days

    So very welcome, good sir! Thanks again all...have a great weekend. I have a feeling I'll be posting more questions soon...working on a lot of Excel projects at work. They think I know more than I really do. :P

+ 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. Dropdown to add days to today's date
    By cbrandonsmith in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2014, 12:22 AM
  2. [SOLVED] Calculate 365/180/90/30 days from today date
    By DonW in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2013, 09:44 AM
  3. How to flag dates that are within 9 days of today
    By MannyLNJ in forum Excel General
    Replies: 7
    Last Post: 06-18-2012, 03:16 PM
  4. Excel 2007 : today()-2 working days, in with other text
    By dancing-shadow in forum Excel General
    Replies: 6
    Last Post: 05-12-2011, 05:05 AM
  5. Counting down from a date when it is 150 days from today
    By HeatherBelle79 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-17-2008, 11:43 AM
  6. Today + 45 days
    By beanzy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-14-2007, 11:20 AM
  7. [SOLVED] 25 days previous to today?
    By MaQ in forum Excel General
    Replies: 5
    Last Post: 03-14-2006, 03:00 PM
  8. Add 4 working days to =Today()
    By piranhagirl in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-23-2005, 05:22 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