+ Reply to Thread
Results 1 to 7 of 7

Merge mixed data - retain date/time formatting

  1. #1
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Merge mixed data - retain date/time formatting

    Hello again.

    I would like a formula to merge the contents of the data in column A (Date), B, (Time), and D (Number) into column E, separated by a " | ", and keep the same Date/Time format. I've attached a sample worksheet and manually formatted the first 3 in column E.

    Note: Col A & B will always contain data. Col D could be blank.

    Any help will be much appreciated.

    Thanks,

    S.
    Attached Files Attached Files
    Last edited by symaxf; 05-03-2011 at 11:10 PM. Reason: to update the title

  2. #2
    Forum Contributor
    Join Date
    10-08-2006
    Location
    Walnut, CA
    MS-Off Ver
    2003,2010, Office 365
    Posts
    114

    Re: Merge mixed data - retain date/time formatting

    Hi,
    Try this macro
    Please Login or Register  to view this content.
    Tony

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Merge mixed data - retain date/time formatting

    hi, symaxf, please check attachment, I'm not sure it's the shortest way but it gives the desired result
    Attached Files Attached Files
    Last edited by watersev; 05-03-2011 at 06:57 PM.

  4. #4
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Smile Re: Merge mixed data - retain date/time formatting

    TonyS and waterserv - Thank you both! The macro and the formula worked as desired!

    Cheers,

    S.

  5. #5
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: Merge mixed data - retain date/time formatting

    Not sure if I need to open a new thread for this but using the same test data attachment with the formula that watersev provided in post #3, how would I add the following to the formula:
    IF column D ("ID") is BLANK (no data) THEN do NOT merge any data into column G.
    -S.

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Merge mixed data - retain date/time formatting

    hi, symaxf, it can be done like this, check attachment file
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Thumbs up Re: Merge mixed data - retain date/time formatting

    Thanks again watersev - it works like a charm!

    Cheers,

    -S

+ 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