+ Reply to Thread
Results 1 to 4 of 4

Match using today's date or next closest date

  1. #1
    Registered User
    Join Date
    12-27-2016
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    34

    Match using today's date or next closest date

    I am having trouble getting the following to work. It always goes to the 'else' portion of the sub. What I am trying to achieve is to set a print range based on finding today's date.The range has all days of the week except Sunday. So if today is Sunday then ideally it would return the following Monday. But for now I would be happy if I could at least get it to return the row for today. Do I have to apply a format to 'Date' or something for it to work?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Match using today's date or next closest date

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    12-27-2016
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    34

    Re: Match using today's date or next closest date

    Thanks it! I never thought of converting to an integer. Thanks much!

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Match using today's date or next closest date

    You're welcome.
    Yeah, dates in Excel always seem to be a little quirky.

+ 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] Adjust EOMONTH formula to return closest end of month date to today?
    By nobodyukno in forum Excel General
    Replies: 8
    Last Post: 01-19-2017, 07:51 PM
  2. Lookup Given Date in Cell A1 to date list in Cell E:E and find closest match
    By Branbran10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2015, 03:26 PM
  3. Replies: 2
    Last Post: 12-18-2014, 09:52 AM
  4. [SOLVED] Find closest date to today in a row of dates
    By scottmcclean in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-17-2014, 04:29 PM
  5. [SOLVED] Formula to find date closest to today
    By mattress58 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-09-2014, 12:18 PM
  6. [SOLVED] Find Entry With Closest Date and Time to Today
    By Steve N. in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2012, 06:09 PM
  7. Finding the closest future date from Today from a list of dates
    By maharg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-18-2008, 09:45 AM

Tags for this Thread

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