+ Reply to Thread
Results 1 to 10 of 10

Mail Merge Ordinal Date Format (Superscript)

  1. #1
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Mail Merge Ordinal Date Format (Superscript)

    Hi

    I googled but could not find a solution to the date format for mail merge.

    How do I merge the date (1-Apr-2018) into the letter in ordinal date format with superscript, ie 1st April 2018.

    Thank you for the assistance.

    Regards
    Nancy

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,496

    Re: Mail Merge Ordinal Date Format (Superscript)

    this might work...
    =DAY(A2)&LOOKUP(DAY(A2),{1,2,3,4,21,22,23,24,31;"st","nd","rd","th","st","nd","rd","th","st"})&" "&LOOKUP(MONTH(A2),{1,2,3,4,5,6,7,8,9,10,11,12;"January","February","March","April","May","June","July","August","September","October","November","December"})&" "&YEAR(A2)

    assumes the data is in A2, adjust as needed.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Mail Merge Ordinal Date Format (Superscript)

    Hi

    Thank you for assisting with the formula to convert the date to ordinal date format.

    However, please assist with
    1) the superscript format, ie 1st April 2018
    2) upon mail merge, retaining the ordinal date format with superscript.

    Thank you and regards.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Mail Merge Ordinal Date Format (Superscript)

    Nancy

    Where are you mail merging to?

    If it's Word you can add the date field twice, the first field would show the day as ordinal using a switch and the second only the month and year.

    In Word ordinal numbers should automatically appear as superscript.
    If posting code please use code tags, see here.

  5. #5
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Mail Merge Ordinal Date Format (Superscript)

    Hi


    I tried this code:

    Please Login or Register  to view this content.
    It works for 1st ,2nd and 3rd. However, 4 onwards showed the superscript of "rd" instead of "th".

    Kindly help to identify the error.

    Attached files for your kind assistance.

    Thank you.
    Attached Files Attached Files
    Last edited by nancyching1711; 04-25-2018 at 11:44 AM.

  6. #6
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Mail Merge Ordinal Date Format (Superscript)

    Hi

    With reference to my above post, is it that excel is unable to mail merge ordinal date format with superscript font.

    Kindly assist.

    Thank you.

    Regards
    Nancy
    Last edited by nancyching1711; 04-29-2018 at 08:59 AM.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Mail Merge Ordinal Date Format (Superscript)

    You can use this to get the ordinal, still trying to work out the superscript part.

    { MERGEFIELD Date \@ "d" \* Ordinal } {MERGEFIELD Date \@ "MMMM yyyy"}

  8. #8
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Mail Merge Ordinal Date Format (Superscript)

    Hi Norie

    Thank you for the code. The superscript part is giving me much headache.

    Regards
    Nancy

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Mail Merge Ordinal Date Format (Superscript)

    Nancy

    You could try doing it manually by selecting the th/nd/rd part and applying the appropriate formatting.

    Not sure how/if that will hold up when doing a mail merge though.

  10. #10
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: Mail Merge Ordinal Date Format (Superscript)

    Hi Norie

    That's what I am doing now. Merging then changing the font type for 2500 is really time consuming. I googled for code and able to get 1st-3rd to superscript format but 4th onwards return with rd eg 4rd, 5rd etc.

    However, I do not know how to trouble shoot for error.

    Please assist. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Getting wrong date format in mail merge word letter
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2015, 07:01 AM
  2. [SOLVED] Help require to get date in dd mm yyyy format in mail merge letter
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2015, 09:57 AM
  3. Replies: 0
    Last Post: 01-05-2015, 07:35 AM
  4. Superscript ordinal numbers in CreateDate field
    By alexisn in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2014, 04:49 AM
  5. [SOLVED] Mail Merge date format
    By excelloser in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2012, 05:41 AM
  6. Mail Merge Query - Format of Merge Fields in Word
    By carlosbourn in forum Excel General
    Replies: 2
    Last Post: 11-10-2007, 07:11 AM
  7. How do I keep the date from changing format in a mail merge?
    By Brynn Wilson in forum Excel General
    Replies: 1
    Last Post: 06-09-2005, 01:05 PM

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