+ Reply to Thread
Results 1 to 2 of 2

Thread: Sheet and Cell selection based on date

  1. #1
    Registered User
    Join Date
    04-08-2011
    Location
    Arkansas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Sheet and Cell selection based on date

    I need help. I am working on a project in which I have a sheet for every day of the month, they are in mmmm format. Each sheet has every day in m/d format. I want excel to autoopen to the sheet that corresponds with the current month while the cursor lands on the cell to the cell that is to the left of the cell that has the current m/d date.
    Here is what I have now (all it does is open to the right month):

    Sub auto_open()
    r = Format(Date, "mmmm")
    Worksheets(r).Select
    End Sub

    Thanks!
    Last edited by kanight; 04-21-2011 at 05:33 AM. Reason: add code tags PM rule

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,176

    Re: Sheet and Cell selection based on date

    Which column has the dates? What format are the dates? Is it text? Or a real date formatted to show month and day? Is there just one row for each day? Do the days start in cell A2? A1? B2? Whatever?

    If there is one row for each day, starting in cell B2, the cell to the left would be:

    Range("A" & Day(Now)+1).Select

    Regards

+ 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.2.0