+ Reply to Thread
Results 1 to 9 of 9

Merging several dates into one cell and separate them by commas

  1. #1
    Registered User
    Join Date
    07-12-2017
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    7

    Merging several dates into one cell and separate them by commas

    Hello,

    I have extracted the dates our courses are given from a file. I have created a pivot table but it's not quite the format I want.
    I would like to group every date by month in the same cell, separated by commas (see the "Proper format" of my file).
    That's one venue per line and all the dates of each month separated by a comma

    That gives something like

    venue/month 8 9 10 11 12
    S01 15 4,21,28 9,24 9,20,29 11
    S02 23 13,22 2,13,23 15 6

    It seems rather straight forward but I can't get it done... and it would be a nightmare to do it manually.
    Would someone here have a solution for me please (I suppose a formula would do the trick)?

    Thanks a lot!
    Attached Files Attached Files
    Last edited by netoine; 08-07-2017 at 08:52 AM.

  2. #2
    Registered User
    Join Date
    07-12-2017
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    7

    Re: Merging several dates into one cell and separate them by commas

    Thanks Ali, I've changed it. Sorry about that (forgot to edit before I posted)

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Merging several dates into one cell and separate them by commas

    Is this what you're looking to do... see attachment
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-12-2017
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    7

    Re: Merging several dates into one cell and separate them by commas

    Thanks for your help but that's not it.

    I'd like to have one venue per line and all the dates of each month separated by a comma, just like in my "Proper format" tab

    That gives something like

    venue/month 8 9 10 11 12
    S01 15 4,21,28 9,24 9,20,29 11
    S02 23 13,22 2,13,23 15 6


    Thanks
    Last edited by netoine; 08-07-2017 at 08:51 AM.

  5. #5
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Merging several dates into one cell and separate them by commas

    Your raw data have formatting issues whereas I had to insert the data into notepad then re-insert it back into Excel.

    See attachment
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-12-2017
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    7

    Re: Merging several dates into one cell and separate them by commas

    Ok I suppose I'm not clear enough, sorry about that.
    What I would like is the day(s) a course is given in the venue in a month. If I take August with S01 and S02 it means that there is going to be a course on the 15th in S01 and one other on the 23rd in S02. For September, there will be 3 courses in S01 (on the 4th, 21st and 28th) and 2 in the S02 (on the 13th and 22nd)

    Hope that helps.
    Thanks!

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Merging several dates into one cell and separate them by commas

    This proposed solution employs helper columns, which may be hidden for aesthetic purposes, on the 'Raw Data' sheet.
    The formula that populates the helper columns is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The formula that populates the column of venues on the 'Proper Format' sheet is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The array entered formula that populates columns B:F on the 'Proper Format' sheet is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The venues column on the 'Proper Format' sheet has conditional formatting applied to hide the #NA errors that occur after the end of the venues list has been reached.
    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Registered User
    Join Date
    07-12-2017
    Location
    London, England
    MS-Off Ver
    Excel 2016
    Posts
    7

    Re: Merging several dates into one cell and separate them by commas

    You're the best, that's exactly it, thank you so much!!!

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Merging several dates into one cell and separate them by commas

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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] format problem
    By burdo77 in forum Excel General
    Replies: 5
    Last Post: 03-19-2015, 05:25 AM
  2. .CSV format problem
    By Graham Barber in forum Excel General
    Replies: 19
    Last Post: 02-06-2014, 02:00 PM
  3. Format Problem
    By aschwalge in forum Excel General
    Replies: 5
    Last Post: 01-24-2014, 05:50 PM
  4. format Problem
    By mohan.r1980 in forum Excel General
    Replies: 1
    Last Post: 11-17-2010, 08:35 AM
  5. Format-Having a problem with a format column.
    By Bob W in forum Excel General
    Replies: 2
    Last Post: 01-23-2008, 05:54 PM
  6. Format problem
    By ConorOB1 in forum Excel General
    Replies: 2
    Last Post: 09-17-2007, 06:37 PM
  7. Format Problem
    By cj21 in forum Excel General
    Replies: 7
    Last Post: 03-29-2006, 12:15 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