+ Reply to Thread
Results 1 to 4 of 4

CONCATENATE Function

  1. #1
    Registered User
    Join Date
    03-29-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    2011
    Posts
    2

    CONCATENATE Function

    I am having trouble using the CONCATENATE FUNCTION with a particular date format. The cell in question is A2, which is a date in the format YYMMDD. Here are the contents of the worksheet:

    A1: AAPL
    A2: 170329
    A3: C
    A4: 00120
    A5: 000

    I am attempting to merge the contents of A1:A5 in cell A6 so that it reads "AAPL170329C00120000". When I do this using the CONCATENATE function the date in A2 reads as some random number. I've tried messing around with the TEXT function, but I cannot get it to read as I'd like. Any thoughts?

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: CONCATENATE Function

    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 03-29-2017 at 11:42 PM.
    Dave

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: CONCATENATE Function

    It might be helpful to see what you have tried that has failed, because it seems to me that the right combination of CONCATENATE() and TEXT() should do this.

    Assuming that A2 is a date serial number (the underlying value is 42823), then something like =TEXT(A2,"yymmdd") should return "170329". What did you try, and what did it return?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: CONCATENATE Function

    Hi, welcome to the forum

    When I do this using the CONCATENATE function the date in A2 reads as some random number.
    Actually that really IS the date - as excel sees it.
    a date is just a number representing the number of days passed since 1/1/900...and then formatted in a way that we recognize as a date. So, for instance, today (Wed Mar 2017) is actually 42823

    However, when you use concat (or left, right, mid) function, it converts the answer to text, no matter what it contains, so it is converting the date to what excel actually sees as the date.

    My personal preference is to use & instead of CONCATENATE, it is less typing, for 1 thing.

    =A1&TEXT(A2,"yymmdd")&A3&A4&A5
    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
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. If(OR) Function with CONCATENATE
    By Phrick in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-20-2014, 03:00 PM
  2. concatenate function
    By km117 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-03-2013, 03:10 PM
  3. Using the CONCATENATE function nested in an IF function
    By rottweiler_lvr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2013, 10:02 PM
  4. If function, then Concatenate
    By bigroo1958 in forum Excel General
    Replies: 5
    Last Post: 04-27-2011, 02:33 PM
  5. Concatenate Function
    By pradeepdeepu_001 in forum Excel General
    Replies: 2
    Last Post: 01-21-2011, 06:51 AM
  6. Concatenate Function
    By Bob@Sun in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-23-2010, 12:19 PM
  7. Concatenate function
    By pboost1 in forum Excel General
    Replies: 1
    Last Post: 03-02-2005, 03:52 PM

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