+ Reply to Thread
Results 1 to 3 of 3

Concatenate Dates from Two cells into one cell with a hyphen as separator

  1. #1
    Forum Contributor
    Join Date
    02-23-2014
    Location
    Melbourne
    MS-Off Ver
    Microsoft 365
    Posts
    174

    Concatenate Dates from Two cells into one cell with a hyphen as separator

    Hi Experts
    I have dates in two cells in an Excel table and i need to combine them both into another cell with a hyphen to separate them
    Could someone please help me. I have attached a test file

    Thanks

    Regards
    Rahul
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,939

    Re: Concatenate Dates from Two cells into one cell with a hyphen as separator

    Try below formula in D5
    =TEXT(B5,"DD-MM-YYYY")&" - "&TEXT(C5,"DD-MM-YYYY")
    or
    =TEXT([@[Pay Period - From]],"DD-MM-YYYY")&" - "&TEXT([@[Pay Period - To]],"DD-MM-YYYY")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Contributor
    Join Date
    02-23-2014
    Location
    Melbourne
    MS-Off Ver
    Microsoft 365
    Posts
    174

    Re: Concatenate Dates from Two cells into one cell with a hyphen as separator

    Hi Samba
    It works perfectly for what I need
    Thanks
    Regards
    Rahul

+ 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] VBA help - concatenate column data to 1 cell with separator
    By Troy3977 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2018, 07:49 PM
  2. Replies: 3
    Last Post: 08-21-2014, 02:54 PM
  3. Macro to Save As a Concatenate of 3 Cells (2 of which are dates)
    By jtal in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-03-2013, 02:11 PM
  4. Replies: 8
    Last Post: 01-17-2013, 09:26 AM
  5. Concatenate Cells Based on Dates and Sum Totals
    By NGNG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2011, 12:54 AM
  6. Replies: 5
    Last Post: 02-22-2011, 06:28 AM
  7. All dates in excel changed now use hyphen, huh?
    By ge0rge in forum Excel General
    Replies: 3
    Last Post: 10-30-2008, 07:34 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