![]() |
How do I calculate dates?
I need to be able to add years onto a starting month/year date. For example,
starting with Jan 90, I would need a column that was 7 years more, then a column that was 10 years more, etc. I've tried all the suggestions in the "Help" menu, to no avail. Any help out there??? |
Try using Edate - you need the Toolpak addin for this, go to Tools, Addins
and check the Analysis Toolpak checkbox. =Edate(A1, 84) will give you 7 years on from the date in cell A1. Edate works using months rather than years so you'd need to multiply up. Use =Edate(A1, 84)-1 if you want the result to be the day/month before that of the start date. "MKChick" wrote: I need to be able to add years onto a starting month/year date. For example, starting with Jan 90, I would need a column that was 7 years more, then a column that was 10 years more, etc. I've tried all the suggestions in the "Help" menu, to no avail. Any help out there??? |
one way
Sub addates() For Each c In Range("e1:e" & Cells(Rows.Count, "e").End(xlUp).Row) c.Offset(, 1) = DateSerial(Year(c) + 7, Month(c), Day(c)) c.Offset(, 2) = DateSerial(Year(c) + 10, Month(c), Day(c)) Next End Sub -- Don Guillett SalesAid Software "MKChick" wrote in message ... I need to be able to add years onto a starting month/year date. For example, starting with Jan 90, I would need a column that was 7 years more, then a column that was 10 years more, etc. I've tried all the suggestions in the "Help" menu, to no avail. Any help out there??? |
All times are GMT +1. The time now is 08:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com