+ Reply to Thread
Results 1 to 7 of 7

Finding a specific date

  1. #1
    Registered User
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    62

    Finding a specific date

    I have a spreadsheet with dates in a row. I am able to create a macro to highlight the colum of todays date but would also like to create a macro to select a date i enter in a specific cell.
    I have used the folrmula below which is a slight variation on the one that finds todays date and works well.

    My dates are in row 2
    FindDate is the name have given cell A2 where I enter the date I am searching for. This is simply Date in the macro that finds todays date.

    Thanks in advance.

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

  2. #2
    Valued Forum Contributor
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    751

    Re: Finding a specific date

    e.g., if I understood correctly:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    62

    Re: Finding a specific date

    This only highlights the column the "FindDate" is in. Not the column further along the row that I am attempting to find

  4. #4
    Registered User
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    62

    Re: Finding a specific date

    Your Range("FindDate") helped me figure it out. I replaced FindDate with it and it worked.
    Thx

  5. #5
    Valued Forum Contributor
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    751

    Re: Finding a specific date

    You can shorten it a bit (code of macro), e.g.:
    Please Login or Register  to view this content.
    or use the 'Find' function.
    Last edited by porucha vevrku; 01-03-2018 at 07:49 PM.

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,273

    Re: Finding a specific date

    dates are notoriously tricky to deal with in VBA
    especially to aussies

    change below line to the format you have the date set in Row 2
    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  7. #7
    Registered User
    Join Date
    05-28-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    62

    Re: Finding a specific date

    Thanks everyone, its working now.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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