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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
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,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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