Storing an array of dates into single cell

stelpstraeur

New Member
Joined
May 8, 2019
Messages
2
Hello,
I am trying to store multiple dates in a single cell as an array, similar to ={1,2,3} and due to the structure of my table I can't use more than one cell for the content of the array.

The dates are formatted like this: 14-9-2018 14:00 (d-m-yyyy hh:mm)
I can't store the dates as text because I need those dates to work when using date filters and date calculations.

This is not working, because the minus sign is seen as a minus to subtract instead of the separator in the date value:
={13-2-2019 13:44;14-2-2019 20:42;19-2-2019 20:42}

When I save this:
={"13-2-2019 13:44";"14-2-2019 20:42";"19-2-2019 20:42"}
then the array is stored as text, but it is not recognized as dates and therefore is not calculable.

I have been trying to save the array using the date serial, but even that doesn't seem to work, not knowing if this could never work or if I made mistakes writing it.

The dates are coming from API calls executed from VBA.

Any suggestions how to get this working?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
What about saving as text and the converting back to a number:

Code:
={"13/2/2019 13:44";"14/2/2019 20:42";"19/2/2019 20:42"}[COLOR=#ff0000]*1[/COLOR]
 
Last edited:
Upvote 0
Thank you, this work perfectly :). It
even
appeared to be possible to use serial date values in this way, which was an even better solution for me!
 
Upvote 0

Forum statistics

Threads
1,215,273
Messages
6,123,984
Members
449,137
Latest member
abdahsankhan

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