Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add columns based on @datediff result

Status
Not open for further replies.

IceRuby

Technical User
Jan 20, 2004
85
AU
Using Excel 2003
Is it possible to automatically create monthly columns based on a @datediff calculation?

For example:
@datediff result is based on columns the difference between columns C & D say 1/12/07 - 1/12/08 = 12 months

Is it possible to automatically create columns
Dec '07, Jan'08, Feb '08 etc for the period of the @datediff result (i.e. 12 months)

Thanks in advance
 
You could do it using VBA but not within Excel's functions AFAIK

You may want to try forum707 for VBA help

Cheers,
Dave

"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me

For all your testing needs: Forum1393
 
I'm not sure what you really want here. Creating columns is rather a vague description and you don't suggest where these columns might be or what they might contain - or whether this is a one-off task or, really, anything useful.

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

Professional Office Developers Association
 





Hi,

Using a PivotTable is the easiest way to REPORT data across columns.

However, if you are accumulating data for purposes other than REPORTING, (analysis, calculation, history) it is not recommended to store data in this type of format.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top