PDA

View Full Version : Concat date and time in one cell



mybadongt
01-04-2017, 09:33 PM
I am a new to VBA and would like to ask for help to concatenate a date and time to one cell. Both the date and time values come from separate cells in different and/or same columns. It could be written side by side columnwise or both date and time could be one on top of each other in the same column like below.



The combined date and time concatenation can be put in a separate column on a different sheet or the same sheet.


Occurred On (NT)
Cleared On (NT)






12/31/2016
12/31/2016


22:40:17
22:41:42










12/29/2016
12/29/2016


21:49:29
21:50:09

xld
01-05-2017, 01:06 AM
It's as simple as something along the lines of


Range("M1").Value = Range("A2").Text & " " & Range("A3").Text

You would need to adjust the cells to your situation.