Full Version: Autocreate date columns base on range ?
UtterAccess Forums > Microsoft® Office > Microsoft Excel
HI there,
I've searched high and low for a solution but I just can't find one .. so it's Utter Access to the rescue ... i hope frown.gif
Oneed to create coloum heading by month from a given input cell ie if a person puts in a start date 11-Aug-05 and end date 05-Nov-05.
A VBA or macro will create the column headings
11-Aug-05 / 30-Sep-05 / 30-Oct-05 / 05-Nov-05
Is this possible ??
Thanks so much for your help !
Ok, I guess I need a little more info, this macro is to do what in general terms.
Your example look like it should make a the first column(a1) heading for the start date, the next column headings b1...should be the 30th(or last day???) of the following month, and the last column should be the End date.
Are there always going to be 4 columns? Is this to be on a new worksheet? Should the headings be in as text, or DateTime format???
Thanks Sas_xpert for having a look into this ..
o answer you questions
1) 1st column is always the start date
2) The next column is the last day of the following month and each subsequent colomn is the last date of the next month until the end date, which is always the last column
3) The number of columns created will always be dependent on the start date thus if Start date was 15-Jan-2005 and end date was 15-Dec-2005 then it would look like this
15-Jan-05 / 28-Feb-05 / 31-Mar-05 / etc etc etc / 30-Nov-05 / 15-Dec-05
Also the column headings should be in date format as they will be used for calculations .
Thanks again for looking at this .. any help appreciated .
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.