I have the following data
Name Date Number_of_apples
-------------------------------
abc 1-1-2012 5
abc 2-1-2012 3
xyz 1-1-2012 4
xyz 2-1-2012 2
xyz 3-1-2012 6
I want to plot a 2D line graph in excel representing the above data.
Graph should contain Date in X axis and Number of apples in Y axis.
Example plot for name abc :

Depending on selection of name, the graph should update to represent data for that name.
This worked for me. Some notes:
Worksheetmodulenamecolumn e.g. ‘xyz’, ‘abc’ etc.Here’s the code:
Edit: How to set-up in Excel
ALT+F11. This opens the VBA editorWorksheetSelectionChangeNote – I am assuming your data starts in column A. If not you’ll need to amend the column references in the code yourself