+ Reply to Thread
Results 1 to 5 of 5

Macro to move cursor to column containing current date at worksheet activation

  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    30

    Question Macro to move cursor to column containing current date at worksheet activation

    Hi all geniuses!

    I have a worksheet that lists dates on one row and across multiple columns (Column A to AGS on row 2) as per my example file attached.
    I want to create a macro that upon worksheet activation moves the cursor to the cell on row 2 that contains today's date.

    I found this macro that works if i had dates listed in rows on a single column instead of the other way around like i have:

    Please Login or Register  to view this content.
    I tried to modify it to work with my setup but couldn't get it to work.

    I also would like the scrolling to work in a way so that when the cursor moves to the cell with the current date, it doesn't make that cell the farthest to the right but instead the first visible cell to the left.

    Thank you all in advance!
    Attached Files Attached Files
    Last edited by Snoddas; 09-03-2013 at 04:40 AM.

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Macro to move cursor to column containing current date at worksheet activation

    Hi try this macro

    you should also edit your own post and put your code in code marks, or a moderator will ping you!

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-12-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Macro to move cursor to column containing current date at worksheet activation

    Quote Originally Posted by NickyC View Post
    Hi try this macro

    you should also edit your own post and put your code in code marks, or a moderator will ping you!

    Please Login or Register  to view this content.
    First, thank you for that posting info, i have edited my post accordingly.

    Second, thank you for that macro! It works fine. However, it does not scroll so that the marked current date is the left-most date but instead it centers the current date. Any suggestion on changes in the macro to make the marked cell the left most cell?

    Thank you

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Macro to move cursor to column containing current date at worksheet activation

    Hi try this variation

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-12-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Macro to move cursor to column containing current date at worksheet activation

    Quote Originally Posted by NickyC View Post
    Hi try this variation

    Please Login or Register  to view this content.
    That did it Nicky! I am very grateful for all your help, thank you so much!
    Reputation added

+ 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. Cursor To be positioned on a cell containing the current date
    By Chris Waller in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2012, 10:46 AM
  2. Move cursor to specified cell on next worksheet
    By EdMac in forum Excel General
    Replies: 10
    Last Post: 02-20-2007, 12:27 PM
  3. How do you set cursor position at current date in macro?
    By Tom Robertson in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-28-2006, 10:55 AM
  4. Replies: 1
    Last Post: 08-26-2005, 03:05 PM
  5. Cursor wil not move left in worksheet
    By Gwen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-29-2005, 03:06 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