Hey Guys,
I have a list of dates that are organized in comma notation, i.e.:
November: 1,2,3,4,5,8,9,11,12,13
Is there any possible way to convert this to:
November: 1-5,8-9,11-13
Any help is appreciated
Hey Guys,
I have a list of dates that are organized in comma notation, i.e.:
November: 1,2,3,4,5,8,9,11,12,13
Is there any possible way to convert this to:
November: 1-5,8-9,11-13
Any help is appreciated
Try this. I haven't tested it exhaustively so the logic might not hold for all instances. This, however, demonstrates the principle.
![]()
Please Login or Register to view this content.
Open the VBA editor by hitting Alt F11.
Insert a new module with Insert - Module
Paste in the above function
Go back to the sheet by hitting Alt F11.
In a cell B1, enter = Compress(A1)
Remember to save the workbook as a macro enabled workbook .xlsm
Martin
This worked exceptionally!
Thanks for all of your help!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks