
Originally Posted by
Ed_Collins
Suggestion...
Create another tab. You will continue to use the first tab when adding new data each day. This won't change.
However, the second tab will contain the chart. It will also contain a cell for the user-desired START and END date. When these dates are filled in, and a custom-button clicked, the macro you write will then copy the entire desired range of data from Sheet 1 to Sheet 2. The graph then grabs the data from Sheet 2 and displays it.
The data then, from Sheet 2, is constantly changing, being overwritten, etc. This is okay. Your original data on Sheet 1 is safe and is never modified.
The macro is a simple, DO UNTIL Loop, to loop through all of the the data in Column A of Sheet 1, looking at the dates. It copies over the entire range desired. The Pseudocode is something like:
Start_Date = Cells(1,1) : End_Date = Cells(2,1)
DO
copy data from Sheet 1 to Sheet 2
LOOP UNTIL Column A's data < Start_Date
Bookmarks