I have an Excel Spreadsheet that I want to add 1 year to the date in a cell.
Cell B3 currently has a value of 1/1/2014
Would like to create a Macro that will change this date to 1/1/2015
Seems easy enough but my search for this have not given desired results. Any help would be appreciated.
Select your cell and run:
Sub dateFixer()
Dim d As Date
d = ActiveCell.Value
ActiveCell.Value = DateSerial(Year(d) + 1, Month(d), Day(d))
End Sub
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments