+ Reply to Thread
Results 1 to 3 of 3

Search for a date in a row and scroll to date column when found

  1. #1
    Registered User
    Join Date
    04-05-2017
    Location
    USA
    MS-Off Ver
    2013
    Posts
    2

    Search for a date in a row and scroll to date column when found

    Hello,

    I have limited VBA experience. I have a date calculated by a formula in cell C1 with format "D-mmm-yr" so today is "6-Apr-17". Row 4 consists of sequential dates starting in column H and going up with the same format. Columns A-G are frozen.

    I need code that will look at the value of C1 (not the formula), find that value (not the formulas) in Row 4, and set that column as the left most column after the frozen panes. I have it as a worksheet activate, but would rather it be a worksheet change as the range of dates will change based on how the data is filtered. This is the code I have so far after researching on this forum.

    Please Login or Register  to view this content.
    I am getting Run-time error '91': Object variable or With block variable not set. After researching that error, I'm assuming I have a problem with not defining my 'TgtCol' line. I've tried several different definitions with no luck. Any help would be appreciated.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,159

    Re: Search for a date in a row and scroll to date column when found

    So...tell me tinparrot

    As per your code above, is the value to be found only in Column D Row 4
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    04-05-2017
    Location
    USA
    MS-Off Ver
    2013
    Posts
    2

    Re: Search for a date in a row and scroll to date column when found

    I don't think I follow. The date calculated in C1 can show up anywhere from H4 to ZZZ4, but always in row 4. I just want the code to find it and scroll to it.

+ 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. Excel 2013 - if date is found between date range return value
    By theshybutterfly in forum Excel General
    Replies: 4
    Last Post: 12-11-2016, 01:14 AM
  2. vba help needed open workbook search date and lock colums from A to date column
    By prasadavasare in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2015, 01:50 AM
  3. [SOLVED] Display msgbox if todays date found in column a
    By ANDREAAS in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-23-2015, 12:25 PM
  4. Search column for string and date then search adjacent cell and pop up message
    By ftwobtwo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2014, 09:55 AM
  5. Auto Fill Todays Date In Column K in Last Value Found in Column A
    By trevor2524 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-18-2013, 02:42 PM
  6. [SOLVED] Search files until date is found
    By twckfa16 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2013, 02:57 PM
  7. find name; search column; if date found-return 3 data pts; move to next row
    By cdl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2008, 10:43 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