I have a spreadsheet with cells dated for every day of the year. My dates are in the following format:
m/d/yyyy 1/23/2013
I need each date (all 365) to roll the day back 1 and the year forward 1.
1/23/2013 –> 1/22/2014
or
2/1/2013 –> 1/31/2014
As of right now I have to change it cell by cell. Is there a way to edit them all at once? Every date in the spreadsheet is in this format, and needs this change. Thanks!
Yes there is. It is called Pastespecial
| Values
with Operation as Add
Type 364 in any blank cell and copy it. Select your range which has dates and do Pastespecial
| Values
with Operation as Add
Answer:
If one of your source numbers is in A1, you can use the following formula
=A1+364
to get the result. Then make sure you use a suitable number format.
I assume that when you say “all 365” you mean there are no leap years to take care of.
Otherwise, use
=DATE(YEAR(A1)+1,MONTH(A1),DAY(A1)-1)
which is good for any date.
Tags: date, excelexcel