I have two columns of shift work data formatted as follows:

A B
1/1/12 08:59:32
1/1/12 13:47:02
1/2/12 09:17:28
1/3/12 23:38:57
1/3/12 01:44:19
1/4/12 07:00:00

I did a multiple level sort using the date column first then the time. My issue is that the data system does not switch the date until the time hits 07:00:00 in the morning. So the two highlighted rows will switch places when I run my sort. I tried to fix this by inserting a column before B (putting the time in column C) and ran an if statement saying: B1=IF(C1<07:00:00,A1+1,A1). This did not work and I am having trouble understanding why. I thought it may be a formatting issue??

Here is an example of the data: https://www.box.com/s/2xhdf9kx17xki7c85nk8
I put the raw data in the first columns and then next to that is how I tried to create a new "Date" column, and I highlighted the dates with issues in red.

Also see link for crosspost:http://www.mrexcel.com/forum/excel-q...parameter.html

Thanks for any help!