create date from separate cells

  • Thread starter Thread starter Flash in the Pan
  • Start date Start date
F

Flash in the Pan

I have:

A1=9
B1=1
C1=08
D1=10
E1=13
F1=12

I want G1 to read:
9/1/08 10:13:12

using a formula

Any help appreciated

Thanks
 
The problem is your year in C1, Excel would probably think it is 1908. Can
there be no earlier years than 2000 you can use

=DATE(2000+C1,A1,B1)+TIME(D1,E1,F1)

then format the cell as

m/d/yy h:mm:ss

--


Regards,


Peo Sjoblom
 
This version appears to straighten out the year problem (basing it on the
regional settings), or at least it does on my system...

=DATE(YEAR("1/1/"&C1),A1,B1)+TIME(D1,E1,F1)
 
Back
Top