+ Reply to Thread
Results 1 to 4 of 4

Copy Date on Excel Tab to Cell In Spreadsheet and Add Year, How?

  1. #1

    Copy Date on Excel Tab to Cell In Spreadsheet and Add Year, How?

    I work on bank reconciliations and the tabs say "7-19", "7-18" etc.
    Figured out how to auto copy the tab data but how can I add to it so it
    reads "7-19-06"?

    THANKS!!!


  2. #2
    Forum Contributor
    Join Date
    11-23-2005
    Location
    Perth, Australia
    Posts
    218

    Copy Data on Excel Tab to Cell in Spreadsheet and Add Year, How?

    Try This
    Change the range to where you want the date displayed

    Sub getname()
    Dim name As Date
    name = ActiveSheet.name
    Range("D26").Select
    ActiveCell.Value = name
    ActiveCell.Select
    Selection.NumberFormat = "d-mmm-yy"
    End Sub

    if i have misunderstood what you wanted let me know!

  3. #3

    Re: Copy Date on Excel Tab to Cell In Spreadsheet and Add Year, How?

    I can't use macros the bank doesn't like it. I tried formatting the
    field as dd/mm/yy but it doesn't add the year when i copy the tab value
    of "7-19".


  4. #4
    Biff
    Guest

    Re: Copy Date on Excel Tab to Cell In Spreadsheet and Add Year, How?

    Hi!

    The file must already exist ( having been saved and given a file name):

    =DATEVALUE(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255))

    Format the cell as DATE

    This will return the current year. If you need a specific year:

    =DATEVALUE(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)&"-year_number")

    Replace year_number as needed: 05, 1999, 2000, 02 etc.

    Biff

    <[email protected]> wrote in message
    news:[email protected]...
    >I work on bank reconciliations and the tabs say "7-19", "7-18" etc.
    > Figured out how to auto copy the tab data but how can I add to it so it
    > reads "7-19-06"?
    >
    > THANKS!!!
    >




+ 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