+ Reply to Thread
Results 1 to 5 of 5

Is there a way of putting the 'st', 'rd' and 'th' after the date?

  1. #1
    Registered User
    Join Date
    05-20-2013
    Location
    Kegworth, England
    MS-Off Ver
    Excel 2019
    Posts
    58

    Is there a way of putting the 'st', 'rd' and 'th' after the date?

    Hi there,
    I'm fairly new to Excel (2003) but nevertheless have been asked to produce what could be described as a 'page a day' diary with different actions to be carried out each day of the week. Each day of the week has various tasks to be completed and are similar every Monday, Tuesday etc.
    I have produced a weeks worth of pages (worksheets) and have been able to format a cell, actually D2, to produce for example 'Monday 1'.
    What I would like it to say though is 'Monday 1st' then the next page 'Tuesday 2nd' and so on.
    Is there an easy way to do this or am I barking up the wrong tree altogether?
    I would appreciate any help as I feel I'm a bit out of my depth.

    Thanks

  2. #2
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Is there a way of putting the 'st', 'rd' and 'th' after the date?

    Hello and welcome to the forum,

    Assuming you have "Monday 1" in cell D2, you can paste this formula into cell E2 (right next to it)
    =D2&LOOKUP(RIGHT(D2,1)*1,{0,1,2,3,4},{"th","st","nd","rd","th"})
    Last edited by Lemice; 05-20-2013 at 03:36 PM.
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  3. #3
    Registered User
    Join Date
    05-20-2013
    Location
    Kegworth, England
    MS-Off Ver
    Excel 2019
    Posts
    58

    Re: Is there a way of putting the 'st', 'rd' and 'th' after the date?

    Hi again Lemice,

    Just been looking through the forum pages and noticed one or two people uploaded examples
    of their sheets to make it easier for "the experts" to see whats going on.

    Attached - hopefully, is an example of part of my diary pages, hope it makes things clearer.

    As you can see I am hoping to put the "rd" and the "th" in the appropriate cells.

    Thanks once again

    Drew

    Drews Date calc sheet.xls

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,729

    Re: Is there a way of putting the 'st', 'rd' and 'th' after the date?

    Quote Originally Posted by Lemice View Post
    =D2&LOOKUP(RIGHT(D2,1)*1,{0,1,2,3,4},{"th","st","nd","rd","th"})
    but that wouldn't give the correct suffix for 11th, 12th or 13th........

    Try this formula in O4

    =LOOKUP(DAY(D4),{1,2,3,4,21,22,23,24,31;"st","nd","rd","th","st","nd","rd","th","st"})
    Audere est facere

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Is there a way of putting the 'st', 'rd' and 'th' after the date?

    I suggest, that you hide a row or column in each sheet and put your =sheet1!D4+1 there (no need for formatting) as it's hidden anyway. Let's say it's in A1

    Then in a visible cell
    =TEXT(A1, "dddd d")&LOOKUP(DAY(D4+1),{1,2,3,4,21,22,23,24,31;"st","nd","rd","th","st","nd","rd","th","st"})
    See attachment
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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