OK, here's your workbook back with a very simple macro included.
I've set cell D3 on the graph sheet to have a drop down list, the same as the dailyplot sheet, but if you change the selection in D3 you'll see the selection on the dailyplot sheet changes to match it.
If you press Alt-F11 to open the VBA editor you'll see the following code.
It should be fairly straightforward to follow. If you want to use a cell other than D3 on the graph sheet change the line where sChangeRange is set. So if, for example, you wanted to use cell A1 change that line to:
The only thing to watch out for is that the code has to be inserted in a very specific place in your live workbook.
1. Open your live workbook.
2. Press Alt-F11 to open the VBA editor
3. There'll be a list of your sheets in the left-hand pane, double-click on the graph sheet
4. A blank code window will open up. From the left-hand drop down at the top select "Worksheet"
5. Excel will insert two lines of code automatically, ignore them.
6. From the right-hand drop down select "Change"
7. Excel will insert another two lines of code, identical to the first and last lines of my code above.
8. Copy the lines of my code which haven't been automatically inserted between the first and last lines.
9. Make any changes you want (e.g. changing the cell with the drop-down list in)
10. Close the VBA editor. You don't need to worry about saving changes before you do - Excel will save all of the changes when you save your workbook.
On that note, you'll no longer be able to save your workbook as a .xlsx file, because Excel doesn't allow macros in files of that type. Either save it as a macro-enabled workbook (.xlsm) or as a 97-03 format file (.xls), whichever you prefer.
Hope this helps.
Bookmarks