+ Reply to Thread
Results 1 to 5 of 5

Manipulating Dates as Text?

  1. #1
    Registered User
    Join Date
    02-18-2020
    Location
    London
    MS-Off Ver
    2010
    Posts
    75

    Manipulating Dates as Text?

    Hi

    I have some day values in a spreadsheet that have been stored as text eg. 1st, 2nd, 3rd... 31st.

    So I can easily strip off the ordinals with LEFT(A1, LEN(A1)-2) to give just the day number as text.

    I'd like to take a properly formatted date from another cell, remove the day, and replace it with the day number above, for example:

    Cell A1: 10th
    Cell A2: 03/07/20
    Result..
    Cell A3: 10/07/20

    Of course Cell A2 is a real date stored as a number value, so I cannot manipulate it as a string.

    The results in A3 also needs to be a real date (not a string) so that if can be sorted in the future.

    Any advice on how I can achieve this please?

    Cheers
    Robin

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Manipulating Dates as Text?

    Here you go:

    =DATE(YEAR(A2),MONTH(A2),LEFT(A1,LEN(A1)-2))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Manipulating Dates as Text?

    Try

    =A2-DAY(A2)+LEFT(A1,LEN(A1)-2)
    Quang PT

  4. #4
    Registered User
    Join Date
    02-18-2020
    Location
    London
    MS-Off Ver
    2010
    Posts
    75

    Re: Manipulating Dates as Text?

    You both made that look so easy :-)

    Thank you very much

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Manipulating Dates as Text?

    That's because it IS easy ... when you know how.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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] Assistance with manipulating Dates into text
    By AceForSale in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-29-2016, 09:07 AM
  2. Manipulating intake & discharge dates, counting between dates
    By lisast in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-02-2013, 03:59 AM
  3. Manipulating dates outputs with criteria
    By stpetece in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-16-2011, 04:13 PM
  4. Manipulating Dates and Format
    By pdiminski in forum Excel General
    Replies: 4
    Last Post: 03-07-2010, 03:55 PM
  5. Manipulating Text
    By John Vieren in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-03-2009, 08:32 AM
  6. Manipulating VBA Text To Columns
    By googlebot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2009, 06:44 AM
  7. [SOLVED] Re: Manipulating dates (was Add 6 months to a date)
    By Bill Ridgeway in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-31-2006, 02:50 PM

Tags for this Thread

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