+ Reply to Thread
Results 1 to 8 of 8

=TEXT Formula for 2022

  1. #1
    Registered User
    Join Date
    12-09-2014
    Location
    Wales
    MS-Off Ver
    2016
    Posts
    80

    =TEXT Formula for 2022

    Hi,

    In the attached sample book I cant figure out what to change in my formula in column C so that when the year changes to 22 in column K; it also changes in column C.

    I am using the formula in column C so that I don't have to replace the . with / each time I use the data source, I can just copy it in and let the formulas do all the work. (data source is European and I am in the UK so the date format is always with a .)

    Any help is much appreciated.

    Aarron
    Attached Files Attached Files

  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,919

    Re: =TEXT Formula for 2022

    This:

    =LEFT(K2,2)&"/"&MID(K2,4,2)&"/"&MID(K2,7,2)&MID(K2,FIND(" ",K2,1),6)
    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 Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: =TEXT Formula for 2022

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: =TEXT Formula for 2022

    Note that using LEFT and MID gives you Text output, not a numeric date and time value.

  5. #5
    Registered User
    Join Date
    12-09-2014
    Location
    Wales
    MS-Off Ver
    2016
    Posts
    80

    Re: =TEXT Formula for 2022

    Thank you all, it's solved now !

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: =TEXT Formula for 2022

    You're welcome. Thanks for the rep.

  7. #7
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: =TEXT Formula for 2022

    I would control the format of your date within the cells. Knowing the configuration of the data source and provided it adheres to this strict date time formatting you can tell the DATE formula where to find the YEAR, MONTH, DAY within your data. I add 2000 to your year so Excel doesnt bump you back to the 1900's.

    COLUMN C
    =TEXT(DATE(2000+RIGHT(LEFT(K2,8),2),RIGHT(LEFT(K2,5),2),LEFT(2))+TIMEVALUE(RIGHT(K2,6)),"DD/MM/YY HH:MM")

    COLUMN D
    =TEXT(DATE(2000+RIGHT(LEFT(K2,8),2),RIGHT(LEFT(K2,5),2),LEFT(2)),"mmm")

    COLUMN E
    =WEEKNUM(DATE(2000+RIGHT(LEFT(K2,8),2),RIGHT(LEFT(K2,5),2),LEFT(2)),21)
    -If you think you are done, Start over - ELeGault

  8. #8
    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,919

    Re: =TEXT Formula for 2022

    If you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. Replies: 2
    Last Post: 03-20-2020, 07:17 PM
  2. Replies: 2
    Last Post: 01-20-2018, 09:59 AM
  3. Replies: 3
    Last Post: 03-04-2014, 01:47 PM
  4. Formula to find and return text string within a cell full of text strings
    By LightingPop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2013, 11:45 PM
  5. Replies: 6
    Last Post: 06-08-2012, 06:54 PM
  6. Replies: 0
    Last Post: 06-03-2010, 01:11 PM
  7. [SOLVED] =?iso-2022-jp?B?V2hlcmUgZG9lcyAiYSwbJEIhSRsoQiBjb21lIGZyb20/?=
    By Mike in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-29-2006, 08:30 AM

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