• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Question on VBA

Shailender

Member
Hello Folks,
I have a question on vba. I have a data from 2003 so with the source data we do some calculations functions like, rank and sumif etc we are running the report successfully every month with the help of VBA with a click of a button and then we are saving the file with saveas in other location.
And in the next month we are using the same file and updating the report with current month.
So my question is as soon as we click a button pop should appear if we put last month or any other month date so that report should run for that specific month. Would it be possible with a click of a button, if so how can I do.

Hope the question is clear.

Thanks in advance
 
Can you post an example file and explain using cell references what you want to happen
 
Hello Hui, Here is the attached excel sheet for you reference. I also included some points in the excel.

Thank you in advance.
 

Attachments

  • Data 01.xlsm
    22.7 KB · Views: 6
Unclear point.
When you save the file, and run it the following month. Should it overwrite existing file or should it add a sheet to existing file?

If latter, no need for vba code. Simple formula and Copy & Move sheet operation via Excels' native menu will do it.

See modified formula in attached along with dynamic named range for dates. Data validation list has been added to B1 for dates.

And why is there "Apple" at Sheet2, B12, below VLookup column?

EDIT: Also, your description from original post really doesn't match what you have in uploaded file (i.e. no calculations you described except for VLOOKUP is there).
 

Attachments

  • Data 01 (1).xlsm
    21.6 KB · Views: 0
Last edited:
Back
Top