Hi,
If you want your times separately from the dates, you can use the 'TIME' function to join your hours and AM/PM in a similar way to how you used the 'DATE' function above. Where DATE expects year,month,day - TIME expects hour,minute,second. You need to know that Excel treats hours as fractions of a day - so 0.5 formatted as time equals 12:00 noon, whilst 0.75 equals 6:00pm, etc.
If your hours are all whole hours, you can use this formula (assuming the hours are in A and AM/PM in B:
Formula:
=IF(AND(A1=12,B1="AM"),TIME(A1+12,0,0),IF(AND(A1=12,B1="PM"),TIME(A1,0,0),IF(B1="AM",TIME(A1,0,0),IF(B1="PM",TIME(A1+12,0,0),"check data"))))
The first two bits of the formula (with the ANDs) are needed to deal with 12AM being midnight and 12PM being noon.
If your hours aren't whole hours, you'll need to do some calculations on them to extract the minutes/seconds before inputting those to the TIME function. As I don't know exactly how your times are recorded, I haven't worked on that - but if you need more help, just ask.
Regards,
Aardigspook
If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark Thread as Solved'.
You don't need to give me rep if I helped, but thanks are appreciated.
Bookmarks