Hi all
I have a log which I am creating, and I need to write a macro/formula to automatically fill in some dates. When I input a date in to Column D, I want Excel to fill in the date two weeks after that in Column K and one month after it in Column L. This is so that I can keep track of when things are due. I have seen it done before on an old spreadsheet I used but I dont have a copy any more... Hope someone can help!
Thanks![]()
Last edited by LKC; 06-21-2011 at 06:01 AM.
As you edited the title.
If your date is given in D1 then
to add two weeks
=D1+14
to add a month
(considering 30 days for one month)=D1+30
regards
johnjohns
When you are not sure where to go, every road takes you there!
Thanks johnjohns. As this is going to be a large sheet that will be continually added to, do you know how to set this so that it does it automatically as soon as you enter the date in any new row on the sheet? And also for any month of the year?
Perhaps this way. See the attachment. Provided, D column contains dates and/or empty cells only (for the macro to run)
regards
johnjohns
When you are not sure where to go, every road takes you there!
This might be more accurate for adding a Month
=DATE(YEAR(A1),MONTH(A1)+1,DAY(A1))
Using Excel 2010 look at Tables for extending the formula, in the example add dates to column A
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Right Roy, I just thought this formula may crash at dates like 31/01/2011 as 31/02/2011 is invalid. But it doesn't. I should have tried it. So I too prefer your answer
regards
johnjohns
When you are not sure where to go, every road takes you there!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks