+ Reply to Thread
Results 1 to 2 of 2

Concatenate text, date and time keeping format

  1. #1
    Registered User
    Join Date
    04-29-2011
    Location
    Portugal
    MS-Off Ver
    Office 365
    Posts
    4

    Concatenate text, date and time keeping format

    Hi everyone, this is my first post on excel forum!

    So I have a data sheet with 4 columns: text | text | date | time, that I want to merge separated by comas.
    If I try to use a simple concatenate function the date and time get merged as their numbers without proper formatting. So I guessed I would need VBA for this.
    I've been trying to get a solution to work there but due to my limited VBA knowledge this has proven to be difficult.

    I've attached a sample sheet.

    Thanks for your help and time!
    Attached Files Attached Files

  2. #2
    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,939

    Re: Concatenate text, date and time keeping format

    Hi, welcome to the forum :0

    Try this, copied down...
    =A2&","&B2&","&TEXT(C2,"d/mmm/yy")&","&TEXT(D2,"hh:mm:ss")
    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. Replies: 9
    Last Post: 08-09-2013, 12:07 AM
  2. Convert date and time in serial number format to text format
    By nda13112 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2013, 02:45 PM
  3. Replies: 1
    Last Post: 06-06-2011, 10:08 AM
  4. Convert cell category from Date to Text, keeping mm/dd/yyyy format
    By chachie22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2011, 05:00 PM
  5. Concatenate Text & Numbers Keeping zeros..
    By glynny in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-17-2006, 06:15 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