+ Reply to Thread
Results 1 to 8 of 8

repeat year in dates

  1. #1
    Registered User
    Join Date
    01-20-2007
    Posts
    4

    repeat year in dates

    how do I get excel to fill in the desired year (other than current).
    thnks,
    Russ

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Not sure what your after

    Can you give an example ?

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    01-20-2007
    Posts
    4

    repeat year in dates

    I am indexing marriage records for our county archives.
    I would like to just enter the marriage date and have excel
    fill in the year date for whatever year I'm indexing.

    It works this way for the current year but not other
    years. Thought about changing the computer date to the desired
    date and then changing it back after completing my days indexing
    Thanks,
    Russ

  4. #4
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    Other than the work-around you suggested, I think this would require VB code.

    You need
    1. a way to tell Excel which year you want to use, and
    2.a way to tell Excel when and how to use it.

    The first could be as simple as putting the year you are indexing in a cell.

    The second would require a Worksheet_Change Event procedure. That procedure would look for a date being entered and change the year from the default (this year) to another year (the one you told Excel about in step 1).

    If I think of another way, I'll let you know. But, that is what comes to mind immediately.

  5. #5
    Registered User
    Join Date
    01-20-2007
    Posts
    4
    Thanks, I'll see if I can work it out.
    In the meantime keep thinking
    Russ

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    This may help, if the year you are working in is say 1935, put 35 in A1. Format column B to Text then enter your day/month (21/1), then in cell C1 this formula

    =DATE(YEAR(1/1/1900)+A1,MONTH(MID(B1,FIND("/",B1,1)+1,2)),DAY(LEFT(B1,FIND("/",B1,1)-1)))
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  7. #7
    Registered User
    Join Date
    01-20-2007
    Posts
    4
    Thanks oldchippy old chappy
    Russ

  8. #8
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Glad to help - thanks for the feedback

+ 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