Combine Multiple Date & Time groups into one Cell

matthewajackson13

New Member
Joined
Aug 29, 2019
Messages
2
I am trying to merge 4 date and time cells together into 1 cell. I am using the following formula:

=CONCATENATE(TEXT(Table_query__42[@[Soft Lock 1 End]],"mm/dd/yyyy h:mm AM/PM"), "; ",TEXT(Table_query__42[@[Soft Lock 1 Start]], "mm/dd/yyy h:mm AM/PM"), "; ",TEXT(Table_query__42[@[Soft Lock 2 End]], "mm/dd/yyy h:mm AM/PM"),"; ",TEXT(Table_query__42[@[Soft Lock 2 Start]], "mm/dd/yyyy h:mm AM/PM"))

It is working to combine all of the dates however, the blank fields are showing up as 01/00/1900 12:00 AM.

I would like the blank fields to show up blank.

Is there a way to combine 4 date and time cells together and exclude blank cells? I have tried to combine the cells without the formatting however, it brings them together as just numbers and not dates.

Any help would be great. Some example data set below:

09/25/2019 8:00 AM9/25/2019 12:00 PM10/01/2019 8:00 AM10/01/2019 12:00 PM
9/25/2019 8:00 AM

09/25/2019 8:00 AM9/25/2019 12:00 PM


<tbody>
</tbody>
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi, welcome to the board.

Perhaps something like replacing
TEXT(Table_query__42[@[Soft Lock 1 Start]], "mm/dd/yyy h:mm AM/PM")

with
IF(Table_query__42[@[Soft Lock 1 Start]]=0,"",TEXT(Table_query__42[@[Soft Lock 1 Start]], "mm/dd/yyy h:mm AM/PM"))
 
Upvote 0
Thanks!

I think I figured it out. I did a version of what you have above.

=CONCATENATE((IF(Table_query__42[@[Soft Lock 1 End]], TEXT(Table_query__42[@[Soft Lock 1 End]],"mm/dd/yyyy h:mm AM/PM"),"")),"; ",(IF(Table_query__42[@[Soft Lock 1 Start]],TEXT(Table_query__42[@[Soft Lock 1 Start]], "mm/dd/yyyy h:mm AM/PM"),"")),"; ",(IF(Table_query__42[@[Soft Lock 2 End]],TEXT(Table_query__42[@[Soft Lock 2 End]], "mm/dd/yyyy h:mm AM/PM"),"")),"; ",(IF(Table_query__42[@[Soft Lock 2 Start]],TEXT(Table_query__42[@[Soft Lock 2 Start]],"mm/dd/yyy h:mm AM/PM"),"")))

Thank you for your help!!!
 
Upvote 0

Forum statistics

Threads
1,215,442
Messages
6,124,886
Members
449,194
Latest member
ronnyf85

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