Refer to PART of a cell text to repeat information in another cell?

Copper Contributor

I have a cell with custom format

mm/dd/yyyy hh:mmAM/PM

And another cell with a different time in it formatted

hh:mmAM/PM

For a data upload, I need that second cell to repeat the date from the first cell so that it has the exact same format as the first cell. Is there a way to refer to just the portion of the cell that I need and repeat that formula in all of the second cells?

I guess that I can copy the first column and change the format to only the date and then use =CONCAT(A2,B2) or =A2&" "&B2 but it's a lot more work in this instance. AND upon testing it, it is losing the date formatting and reading the date as a division problem... so that's not working either. :(   

If anyone could help me trouble shoot either of those solutions, I will send you cookies! :)

Best,

Amanda

1 Reply

@BravoCampbell 

Amanda, in Excel dates are actually integers numbers starting from Jan 01, 1900 which is equal to 1. Time is decimal part of the number, 1 hour is actually the 1/24 value. Format is only helps to show them in more human friendly form.

 

Thus I'd work with values, don't care about formats. If you have datetime value the date only will be =INT(A1) and the time only will be =MOD(A1,1). You may apply to the result any desired format.

 

Above is just basics, not sure what exactly you'd like to receive. Maybe small sample file ?