+ Reply to Thread
Results 1 to 7 of 7

Is there a way to copy and paste the date into worksheets

  1. #1
    Registered User
    Join Date
    06-21-2005
    Posts
    6

    Is there a way to copy and paste the date into worksheets

    Is there a way to copy and paste dates into the worksheet without individually typing up each one?

  2. #2
    Registered User
    Join Date
    06-21-2005
    Posts
    6

    Let me rephrase that

    Is there a way to insert it the date into the the worksheet tab (not the cells in the actual worksheet but the name of the worksheet itself.

  3. #3
    CLR
    Guest

    Re: Is there a way to copy and paste the date into worksheets

    Hold down Ctrl key and press semicolon

    Ctrl-Shift colon will give the time

    Vaya con Dios,
    Chuck, CABGx3



    "mark_vi_" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is there a way to copy and paste dates into the worksheet without
    > individually typing up each one?
    >
    >
    > --
    > mark_vi_
    > ------------------------------------------------------------------------
    > mark_vi_'s Profile:

    http://www.excelforum.com/member.php...o&userid=24507
    > View this thread: http://www.excelforum.com/showthread...hreadid=381378
    >




  4. #4
    Gord Dibben
    Guest

    Re: Is there a way to copy and paste the date into worksheets

    Mark

    VBA only.

    Sub sheetname()
    ActiveSheet.Name = Format(Now(), "dddd-mmm-yy")
    End Sub

    If not familiar with VBA and macros, see David McRitchie's site for more on
    "getting started".

    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    In the meantime..........

    First...create a backup copy of your original workbook.

    To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

    Hit CRTL + R to open Project Explorer.

    Find your workbook/project and select it.

    Right-click and Insert>Module. Paste the code in there. Save the
    workbook and hit ALT + Q to return to your workbook.

    Run the macro by going to Tool>Macro>Macros.

    You can also assign this macro to a button or a shortcut key combo.


    Gord Dibben Excel MVP
    On Wed, 22 Jun 2005 15:19:54 -0500, mark_vi_
    <[email protected]> wrote:

    >
    >Is there a way to insert it the date into the the worksheet tab (not the
    >cells in the actual worksheet but the name of the worksheet itself.



  5. #5
    Registered User
    Join Date
    06-21-2005
    Posts
    6

    That's great, but...

    Thanks for the macro tip.

    But now let's say hypothetically I am starting back in September 2004 and I want to add the dates (September 1, 2004 - June 23, 2004) day-by-day to the tab. The macro you proposed is only for today's date. Is there a macro that can be used so when I type in September 1, 2004 to the tab the next sheet will read September 2, 2004 and the next one September 3, 2004 and etc...? In other words is there a macro which increases the dates incrementally?

  6. #6
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    Try this macro

    I assume that first sheetname name to be september 2,2004 , you can edit it by changing dtdate variable value


    Sub macro()
    Dim init As Variant
    Dim dtdate As Date
    dtdate = "September 2, 2004"
    init = 0
    For Each w In Worksheets
    w.Select
    If init = 0 Then
    init = 1
    ActiveSheet.Name = Format(dtdate, "mmmm d, yyyy")
    Else
    dtdate = DateAdd("d", 1, dtdate)
    ActiveSheet.Name = Format(dtdate, "mmmm d, yyyy")
    End If
    Next
    End Sub

  7. #7
    Registered User
    Join Date
    06-21-2005
    Posts
    6

    That did the trick!!! :)

    that macro works great

    thanks for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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