locked
Convert Current Date to specific text RRS feed

  • Question

  • I need to find a way to enter certain text in a field by current date.  Example:  If the current date today was 01/01/2014 then the text would be oak.  There would be a unique text identifier for every day of the year.
    Friday, December 27, 2013 2:28 PM

Answers

  • As far as I know, this only applies to 2014.  They gave us a calendar in excel and these need to be on the product label instead of the year.  It would be nice to be able to fill in the field from the excel file, similar to vlookup.

    Depending on the data layout (i.e. all dates in a single column and the substitutions adjacent), you might be able to achieve your goal using a label mailmerge.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    • Marked as answer by George123345 Tuesday, January 7, 2014 1:38 AM
    Friday, December 27, 2013 9:44 PM

All replies

  • What kind of field and where would the data to go with the dates come from? How do you propose to handle leap years?

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Friday, December 27, 2013 3:34 PM
  • Also, do you care about the year or just the month and day?

    Charles Kenyon Madison, WI

    Friday, December 27, 2013 4:51 PM
  • If your date was written correctly, you can use Function like year() month() day()

    or you can use mid(range().text) function in VBE


    Oskar Shon, Office System MVP - www.VBATools.pl
    if Helpful; Answer when a problem solved

    Friday, December 27, 2013 6:39 PM
  • As far as I know, this only applies to 2014.  They gave us a calendar in excel and these need to be on the product label instead of the year.  It would be nice to be able to fill in the field from the excel file, similar to vlookup.
    Friday, December 27, 2013 7:59 PM
  • One of your first jobs should be to create a table (somewhere) that specifies for each "day of the year" what the text should be. No-one here can really help you with that - after all, which day in 2014 is "silver birch" ? Are all days "tree days"?

    If your table needs to be any more compicated than you have indicated - e.g., perhaps what you really wanted was a different "tree" for each day of the month, or for this to work in 2015 as well (I thin kyou dealt with that) - going through that process may pose some extra questions that you can answer on your own.

    Afeter that, it's a question of exactly what you are trying to produce in Word, and how to use that table to do it easily, if possible.



    Peter Jamieson

    Friday, December 27, 2013 8:30 PM
  • As far as I know, this only applies to 2014.  They gave us a calendar in excel and these need to be on the product label instead of the year.  It would be nice to be able to fill in the field from the excel file, similar to vlookup.

    Depending on the data layout (i.e. all dates in a single column and the substitutions adjacent), you might be able to achieve your goal using a label mailmerge.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    • Marked as answer by George123345 Tuesday, January 7, 2014 1:38 AM
    Friday, December 27, 2013 9:44 PM