+ Reply to Thread
Results 1 to 3 of 3

VBA to loop through range to find date closest to today's date

  1. #1
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    VBA to loop through range to find date closest to today's date

    Hi all,

    I am trying to write a code that loops through a range (CG1:CR1) of cells (which include certain dates) to find the cell/date that is closest to but smaller than today's date and then run a certain Macro. It should NOT run the Macro e.g. APR_17 if today's date is 06th November 2017 and run NOV_17 instead...

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: VBA to loop through range to find date closest to today's date

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: VBA to loop through range to find date closest to today's date

    Please Login or Register  to view this content.

+ 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] Match using today's date or next closest date
    By BobZZ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-12-2017, 12:13 AM
  2. [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
  3. [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
  4. [SOLVED] look-up a date in a range and find the date that is closest todays date
    By VanShark in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-12-2014, 09:46 PM
  5. [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
  6. Find last date in range (with blanks) that is less than TODAY()
    By cbsalt in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-13-2011, 01:46 PM
  7. find closest date (number) in a range
    By wamp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2010, 01:50 PM

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