Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

modifying dates in MS WORD

Oct 2, 2005 10:26PM PDT

Hello;
I have been working on a project for weeks now and have not been able to produce the results that I am looking for. I was told that I could use excel or msword for this document. .
The document contains 12 fields that hold a date spread (mmmyy) for a 1 year (JUN 06 JUL 06 AUG 06, etc). The user is to place the begining month/year in the first cell and the application should process the next 11 dates in sucession.
(ex: I enter Jun06, On the below example.)
JUn06 JUL 06 AUG 06 sep 06 oct 06 nov 06 dec 06 jan 08 feb 08 mar 08 apr 08 may 0Cool. The user had the ability to use any month/year to start on. The year field has to change also when crossing over into the next year. The problem that I am having in word or Excel is there seems to be no function or formula that would allow me the flexability to modify these individual fields.
Thank you ahead of time.
Don Rago

Discussion is locked

- Collapse -
Date series....
Oct 2, 2005 11:38PM PDT

Not sure in Word, but a simple way to do it in Excel. No function or formulae is required.

?Enter date in first filed, e.g. cell A1 - June 2005. Jun-05 will appear.

?Hold down left mouse button and place cursor at the lower right corner of the cell so that the 'plus' sign appears, then drag across the fileds,e.g. cell A2,A3...to A12. Release button. Months and years appear, including the year change over. If you now record a macro for this procedure, then if you enter a different start date and then run the macro, the appropriate data will fill the cells across the field.

This macro can be written, but I am not familiar with VBA. Hope this works for you.

- Collapse -
Re: dates in Excel
Oct 3, 2005 4:04AM PDT

I would do it with formulas. Like day, month, year to get the components of a date and date for the reverse operation (make a date out of day, month and year). Then it's rather elementary, I should say.

If this is an assignment ask your instructor what the spreadsheet should do if the user enters Aug 31, or Jan 29 and it's a non-leap year. You need a lot of IF's to make this really working.

Hope this helps.


Kees