+ Reply to Thread
Results 1 to 8 of 8

Reading a date from another sheet and changing the format

  1. #1
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Reading a date from another sheet and changing the format

    Good Morning,

    On my "Factory" sheet in cell B7 i enter the date in the format 13.11.12
    On the next sheet "Customer" I have a date box G17.

    I need a formula to put into G17 which will read the date automatically from the Factory sheet and change to 13th November 2012.
    It must include the "th" or "st" depending on the day.

    Is this possible?

    Thank you
    Darren

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Reading a date from another sheet and changing the format

    Is that a proper date format (i.e. with the full-stops), or is that a text value in cell B7 ?

    Pete

  3. #3
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Reading a date from another sheet and changing the format

    I do enter it as text, I'm guessing this will be the problem?

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Reading a date from another sheet and changing the format

    hi cafc_fuller. the formula would be much simpler if they are in proper dates instead of text. you can work with this though:
    Please Login or Register  to view this content.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Reading a date from another sheet and changing the format

    This is perfect, thank you so much. You guys are great.
    This is not vital but is their anyway to remove the #VALUE! (I know it appears when the date is not entered), but just looks ugly when its on the sheet?

    Or is this impossible?

    Thanks
    Darren

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Reading a date from another sheet and changing the format

    Here's another way - put this in G17:

    =DAY(--SUBSTITUTE(Factory!B7,".","/"))&IF(AND(MOD(ABS(DAY(--SUBSTITUTE(Factory!B7,".","/"))),100)>=10,MOD(ABS(DAY(--SUBSTITUTE(Factory!B7,".","/"))),100)<=14),"th",CHOOSE(MOD(ABS(DAY(--SUBSTITUTE(Factory!B7,".","/"))),10)+1,"th","st","nd","rd","th","th","th","th","th","th"))&TEXT(--SUBSTITUTE(Factory!B7,".","/")," mmmm yyyy")

    Hope this helps.

    Pete

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Reading a date from another sheet and changing the format

    If you want a blank if Factory!B7 is blank, you can do this with mine:

    =IF(Factory!B7="","",DAY(--SUBSTITUTE(Factory!B7,".","/"))&IF(AND(MOD(ABS(DAY(--SUBSTITUTE(Factory!B7,".","/"))),100)>=10,MOD(ABS(DAY(--SUBSTITUTE(Factory!B7,".","/"))),100)<=14),"th",CHOOSE(MOD(ABS(DAY(--SUBSTITUTE(Factory!B7,".","/"))),10)+1,"th","st","nd","rd","th","th","th","th","th","th"))&TEXT(--SUBSTITUTE(Factory!B7,".","/")," mmmm yyyy"))

    Hope this helps.

    Pete

  8. #8
    Registered User
    Join Date
    01-04-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    67

    Re: Reading a date from another sheet and changing the format

    Amazing, Thank you!

+ 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