+ Reply to Thread
Results 1 to 14 of 14

Why does =A1&A2 does not work with date format?

  1. #1
    Forum Contributor
    Join Date
    11-01-2018
    Location
    England
    MS-Off Ver
    2016
    Posts
    280

    Why does =A1&A2 does not work with date format?

    I am trying to combine a date cell with a general cell.

    Here is the data:

    Date Code
    14/03/19 HACK001
    14/03/19 DUNN001
    14/03/19 BRAD001


    This is what I have used:

    Please Login or Register  to view this content.
    but the output is:
    Date Code Combined
    14/03/19 HACK001 43538,HACK001
    14/03/19 DUNN001 43538,DUNN001
    14/03/19 BRAD001 43538,BRAD001

    How can I make it to look like this:
    Date Code Combined
    14/03/19 HACK001 14/03/19,HACK001
    14/03/19 DUNN001 14/03/19,DUNN001
    14/03/19 BRAD001 14/03/19,BRAD001
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Why does =A1&A2 does not work with date format?

    Excel stores dates as a number, then displays them according to the cell numberformat.

    To display as a text date, you need to convert the number to text:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    11-01-2018
    Location
    England
    MS-Off Ver
    2016
    Posts
    280

    Re: Why does =A1&A2 does not work with date format?

    That worked! - Thank you

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Why does =A1&A2 does not work with date format?

    try: =FormatFormula(A2) & "," & B2
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Why does =A1&A2 does not work with date format?

    Not familiar with that function Alan - can't find any reference, and doesn't exist in Excel 2016...?

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Why does =A1&A2 does not work with date format?

    Guess it must be a 2019 function. Olly, thanks for noting.

  7. #7
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Why does =A1&A2 does not work with date format?

    I can't find any documentation on it? Are you sure it's native?

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Why does =A1&A2 does not work with date format?

    I don't have any add-ins and I am running 2019 and it appears to be native.

    v A B C D E F
    1 Date Code Combined
    2 14/03/19 HACK001 43538,HACK001 3/14/2019,HACK001
    3 14/03/19 DUNN001 43538,DUNN001 3/14/2019,DUNN001
    4 14/03/19 BRAD001 43538,BRAD001 3/14/2019,BRAD001

    v A B C D E F
    1 Date Code Combined
    2 43538 HACK001 =A2&","&B2 =FormatFormula(A2) & "," &B2
    3 43538 DUNN001 =A3&","&B3 =FormatFormula(A3) & "," &B3
    4 43538 BRAD001 =A4&","&B4 =FormatFormula(A4) & "," &B4

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Why does =A1&A2 does not work with date format?

    Attachment 659168 This is what is in 2019

  10. #10
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Why does =A1&A2 does not work with date format?

    Can't see your attachment. Seems odd that it's not documented? How did you find it?!

  11. #11
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Why does =A1&A2 does not work with date format?

    Here is the attachment again. I had not seen or used this previously. Thought I had read about it in a post in one of the forums a couple of months back. Details are really fuzzy. However, it is not part of my UDF's
    Attached Images Attached Images
    Last edited by alansidman; 01-23-2020 at 06:18 AM.

  12. #12
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Why does =A1&A2 does not work with date format?

    Doesn't look native - Lower case function name, and those argument names don't look standard Microsoft.

    I'm intrigued - wondering where it's come from, and what it does!

  13. #13
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Why does =A1&A2 does not work with date format?

    That is UDF from ForumTools AddOn.

    Capture.JPG
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  14. #14
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Why does =A1&A2 does not work with date format?

    @KOKOSEK

    Interesting. I don't recall adding ForumTools AddOn to my system, but it is clearly, in my VBE. Thanks for clarifying.

+ 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] Date Format Change in other systems and due to that Macro doesn't work properly
    By brajpalshishodia in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 07-16-2019, 09:50 AM
  2. [SOLVED] CONCATENATE+TEXT+RANDBETWEEN+date format - doesn't work
    By sandy666 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 03-01-2015, 05:10 PM
  3. Date format wont work? Spreadsheet uploaded
    By domgilberto in forum Excel General
    Replies: 4
    Last Post: 10-21-2014, 03:59 PM
  4. [SOLVED] Difference in date format on same work sheet
    By akbar in forum Excel General
    Replies: 4
    Last Post: 05-20-2014, 09:39 AM
  5. [SOLVED] returning date instead of number (format doesn't work)
    By denvdm in forum Excel General
    Replies: 9
    Last Post: 08-17-2012, 10:28 AM
  6. [SOLVED] the date format is not working ,sort by date doesn't work.
    By Rosa Campos in forum Excel General
    Replies: 1
    Last Post: 09-12-2005, 06:05 PM
  7. My date format will not work.
    By LJfeild in forum Excel General
    Replies: 3
    Last Post: 02-28-2005, 12:06 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