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

VBA code for auto-update of Dates in excel table and chart

ashokpershad

New Member
Hi!!
I have prepared some charts in Excel using excel table. The information in the table automatically updated whenever we open the excel and update the Date column. But it will not update in case we do not update the date column. I am requesting a VBA code where the Dates are automatically keeps on adding up in new row (adding 24 hours to the previous date) every time we open the workbook. At the same time the charts should also get updated automatically.
Also if we forget to open the workbook during weekends then whenever we open the workbook all those former dates should add automatically in the table without any blanks.
I hope you understand what I am trying to ask.
Please feel free in case you feel difficulty in understanding the question.
I am attaching one sample file to make understanding more clear.

Regards
Ashok
 

Attachments

  • VBA Code.xlsx
    23 KB · Views: 0
Hi Ashok,

This may not be viable depending on how the data is coming in, but if you Select Data on your chart, and then for Horizontal Axis you pick the Date column of your table, you don't need to worry about filling in the missing Dates. XL will automatically space the data points horizontally as needed to line up with the dates. This would be a very simple solution.
 

Attachments

  • VBA Code LM.xlsx
    21.7 KB · Views: 1
Back
Top