In Excel, change only the year component of a date
How do I change j开发者_StackOverflow社区ust the year component of a date using Excel formulas?
example: 12/31/07 --> 12/31/11
Use (for example)
=DATE(YEAR(A1)+5,MONTH(A1),DAY(A1))
A general way to do this:
=DATE(2011, MONTH(A1), DAY(A1))
I had the same problem but just highlighted the date and then went to Find and Select on the Home Ribbon, selected replace and typed in 2010 (the year I wanted to change) and 2013 (the year I wanted to change to) in the Find What/Replace What box and clicked on Replace All and it changed all the dates.
Say you have 12/31/07 in cell A1
=DATE(YEAR(A1)+4, MONTH(A1), DAY(A1))
Int(A1) The time part is the decimal portion
Please see the syntax below, you can easily change the year without changing month or date.
Syntax =EDATE(start_date,months)
You can see the article here
Click here!
精彩评论