Operating System - Microsoft
1752781 Members
6647 Online
108789 Solutions
New Discussion юеВ

Re: Need help with Excel Macro

 
SOLVED
Go to solution
Vadim Loginov
Advisor

Need help with Excel Macro

Hi,

I am wondering if there is any way how I can change Excel Macro code dynamically.
I am asking cos IтАЩve got the following task:

Each month I need to produce Excel spreadsheet with Macro.
Macro will perform the following function. It will import CSV files (hosted on http server) into a spreadsheet and produce some graphs. CSV files have dynamic name: like 200804.csv, 200805.csv. (If now is June, the latest CSV file is for May)

Any advice will be much appreciated.

Thanks
Vadim
2 REPLIES 2
Jon Finley
Honored Contributor
Solution

Re: Need help with Excel Macro

Try something like the following:

=(TEXT(YEAR(NOW()),"????")&TEXT(MONTH(NOW())-1,"0?"))&".CSV"

Jon
"Do or do not. There is no try!" - Yoda
Vadim Loginov
Advisor

Re: Need help with Excel Macro

Hi Jon,

Thanks for pointing me to the right direction.

V.