Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Operating System - Microsoft
cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with Excel Macro

SOLVED
Go to solution

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
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

Re: Need help with Excel Macro

Hi Jon,

Thanks for pointing me to the right direction.

V.