+ Reply to Thread
Results 1 to 6 of 6

Concatenate formula // Date Weird

  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    Glasgow should be in UK
    MS-Off Ver
    Excel 2016
    Posts
    76

    Concatenate formula // Date Weird

    Hi Guys,

    Not sure how to explain so made the attached file as well. I'm trying to use concatenate function which seems to be working fine, but the date which I am merging is coming as number instead of date in itself. I checked the format and in their it appear as number, but when i change it to date format it still appear as weird number... If you look column D it appear as date but after function they are number instead.any idea why its happening??
    Sorry for not very clear, please guide me through its cruical to me
    Regards,
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Concatenate formula // Date Weird

    when you concatenate or join a real date it ignores the formating and gives the date serial number(put a date in a cell and format general to see one)
    so you have to make it go back to a text date TEXT(D1,"DD MMM YYYY")

    =CONCATENATE(TEXT(D1,"DD MMM YYYY")," ",D2)
    or =CONCATENATE(TEXT(D1,"DD MMM YYYY "),D2)
    or=TEXT(D1,"DD MMM YYYY")&" "&D2
    or=TEXT(D1,"DD MMM YYYY ")&D2
    Last edited by martindwilson; 03-15-2013 at 07:51 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Concatenate formula // Date Weird

    =TEXT(D1,"dd mmmm yyyy")&" "&D2

    Should do the job.
    Say thanks, click *

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Concatenate formula // Date Weird

    Dates in Excel ARE large numbers like 43567.... then Excel formats that number to display as a date format you choose.

    If you try to concatenate a date cell, it will reveal the actual underlying number as it is converted to text. Concatenation returns a text string, FYI.

    But now that you know that, you can use the TEXT() function to format the date 'text' in the date 'format' that you want.

    =TEXT(D1, "dd mmmm yyyy ") & D2
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    10-26-2012
    Location
    Glasgow should be in UK
    MS-Off Ver
    Excel 2016
    Posts
    76

    Re: Concatenate formula // Date Weird

    Thanks guys! I was googling to see why Excel is converting date into numeric format even though within format we have selected date function, All the above suggestion are working, but I want to know how to change the formating to make it as date and not to complicate.. more then that I want to add into my knowledge base.. I can live with text function but want to know why its happening and how to change. Again guys you are life and soul to people like me and a big THANK YOU!

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Concatenate formula // Date Weird

    if you format the cell as text beforetyping in a date it will stay as text but you would have to type 01 February 2008 long hand

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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