The Computer Oracle

Change year in many date fields in excel?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Quiet Intelligence

--

Chapters
00:00 Change Year In Many Date Fields In Excel?
00:35 Accepted Answer Score 19
01:17 Answer 2 Score 6
01:38 Answer 3 Score 3
01:56 Answer 4 Score 1
02:12 Answer 5 Score 0
02:26 Thank you

--

Full question
https://superuser.com/questions/191568/c...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#microsoftexcel #worksheetfunction #datetime

#avk47



ACCEPTED ANSWER

Score 19


If the date cells are all in one column, here's a quick and dirty way:

Assuming the dates are in A1 downwards, insert two columns to the right.

In B1, put the formula: =DATE(YEAR(A1)-4,MONTH(A1), DAY(A1))

Copy this formula down the column to recalculate all the dates from column A.

Now select and 'copy' column B (the new dates) and use 'paste as values/paste values' into column C.

Now delete the original column and the one containing the formulas to leave the new fixed dates.

If the original dates are not in neat columns you may have to do a bit more work!




ANSWER 2

Score 6


  1. Highlight the column where the dates are, then under the Home Tab, go to "Find & Select", then click "Replace"
  2. Type "2014" under Find What, then type "2010" under Replace With
  3. Click Replace All



ANSWER 3

Score 3


If you have a fixed year in mind:

=DATE(2010,MONTH(A1),DAY(A1))

if you want to shave off a number of years:

=DATE(YEAR(A1)-4,MONTH(A1),DAY(A1))

Where A1 is the cell containing the date to convert.




ANSWER 4

Score 0


If the data is all collected in a column or row, you can take the data and subtract 1460 (the ammount of day in 4 years)

alt text

note: C3 is the highlighted cell.