Group multiple columns into one

sbawnh

Board Regular
Joined
Feb 25, 2019
Messages
50
Office Version
  1. 365
Platform
  1. Windows
Good morning!
I'm interested in getting a single cell that lists a group of dates originating from multiple columns.

Imagine column A is ID's, Imagine columns(B:F) are dates relating to the ID.

I want to put the dates all together in one cell, but using this formula, if there are blanks, I will have extra Commas.

How else could I do this?

Thank you!

=TEXT(B2,"mm/dd/yyyy")&", "&TEXT(C2,"mm/dd/yyyy")&", "&TEXT(D2,"mm/dd/yyyy")&", "&TEXT(E2,"mm/dd/yyyy")&", "&TEXT(F2,"mm/dd/yyyy")

I tried ideas of concatenation, but I don't like where it's going. Can I use REPT with text, based on count of non-blanks?

=CONCATENATE(IF(B2="","",(TEXT(B2,"mm/dd/yyyy")))&", "&IF(C2="","",TEXT(C2,"mm/dd/yyyy"))) Etc..
 
Last edited:

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I got somewhere! I just have a single end comma now!

=LEFT(TEXT(B2,"mm/dd/yyyy")&", "&TEXT(C2,"mm/dd/yyyy")[ETC...],COUNT(B2:F2)*12)

02/01/2019, 03/01/2019,
 
Upvote 0
I'm done! Sorry. You can delete or if it's interesting, thank you for helping if you've seen this.

=LEFT(TEXT(B2,"mm/dd/yyyy")&", "&TEXT(C2,"mm/dd/yyyy")
[ETC...],COUNT(B2:F2)*12),COUNT(S2:Y2)*12-2)
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top