#1
|
|||
|
|||
Link (to Excel cell) Field Date Formatting Showing Incorrect Year
Hello, I have a word document with some link fields I am trying to format. The fields in excel are formatted with a date format of MMM-yy, but I want them to show in Word as MMMM yyyy. Here is the field code in Word: { LINK Excel.SheetMacroEnabled.12 "\\\\fs-01\\My Documents\\JOB FILE FOLDER\\2023\\23-060.xlsm" "LMT!R6C3" \a \t \@ "MMMM yyyy" } The cell in Excel looks like this May-23, and the field in Word displays May 2023. This is as it should be. The problem occurs when I link another cell with a date from one year earlier. In Excel, the date is May-22, and if I don't add the date switch, it displays May-22 in Word. When I add \@ "MMMM yyyy" to the switch, it displays May 2023. Here is the field code: { LINK Excel.SheetMacroEnabled.12 "\\\\fs-01\\My Documents\\JOB FILE FOLDER\\2023\\23-060.xlsm" "LMT!R6C4" \a \t \@ "MMMM yyyy" } Why does it show the current year? |
#2
|
|||
|
|||
There's no change the "May-22" as displayed is actually "May 22" as in the twenty-second of May, in American date style, is there? When you select that sell, the formula bar is telling you it's 5/__/2022? and not 5/22/2023?
|
#3
|
|||
|
|||
The cell is actually a formula - EOMOnth(D5,-1). If I apply the format M/dd/yyyy it displays 5/31/2022.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Empty date cell shows wrong month & year | Learner7 | Excel | 3 | 06-16-2019 11:09 AM |
changing only year component in a date field using vba | Zhibek | Word VBA | 5 | 08-16-2018 01:29 AM |
Baseline Slippage showing incorrect date | jim44 | Project | 0 | 04-29-2018 06:05 PM |
Year date not showing at bottom of chart. | snowboarder2 | Excel | 4 | 02-28-2017 05:13 PM |
How to calculate a rolling year-to-date percentage by quarter as the year progresses | sleake | Excel Programming | 2 | 04-23-2015 11:51 AM |