Date AND Time Shift in Excel

grogger

New Member
Joined
Oct 13, 2015
Messages
6
Hello,
I am new to the forum and thanks to all who made this possible. A great resource!

In Excel 2010, I have 2 columns with data like this (with many rows of time stamped data)
9/2/2015 13:9:7

I've discovered that the real-time clock of the device wasn't set correctly, and thus the time and date is incorrect. However, I do know the correct date and time the first value should be set to:
9/26/2015 11:56:0

After I change the first date/time to match the correct date and time, how can programmatically set the 2nd and subsequent values so that they are corrected accordingly?

Thank you for helping me with this!

Regards,
Gary
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Welcome to the board.

Assuming that the difference for all the wrong date/times vs their correct date/times is the same (each off by 23 days 22 hours 46 minutes and change)

Take 2 cells.
The first cell that that is wrong, but you know what the correct time should be.
Say A1

In an available cell (say B1), put in the date/time that A1 should be corrected to.

In another cell, say C1, put the formula
=B1-A1

COPY C1

Highlight the whole range of incorrect date/times
Right Click - Paste Special - Values - Add - OK.

The ADD is the critical part
You have to actually click on Paste Special, it's not in the fancy slide out box when you just hover over paste special.
 
Upvote 0
Hi, thanks!
Currently date and time are in separate cells. Should they be concatenated since the month transitions from Aug to Sept? Also, time is in 24hr format. Do you see any issue there?

Gary
 
Upvote 0
So if the wrong dates and times are in columns A and B respectively
Add a helper column (Say C) and put
=A1+B1

Then follow the same steps as before, but paste the values onto column C.
(you may have to convert C to values first with copy/pastespecial/values)

Then you can split the resulting values back into seperate cells with
=INT(C1) for the Date
=MOD(C1,1) for the Time.
 
Upvote 0
I take it all back....got it *after I read* what you wrote in your last post. Thanks! :eek:
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,443
Messages
6,159,907
Members
451,601
Latest member
terrynelson55

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top