the thing is that the part of the code with the chart i have i need the part
"at each change in"
you see i have a sales report and in column c are each salesreps department so i want a chart for each dept.
so the code i need is
at each change in
the truth is this applies for anything
"at each change in c.copy.range("F:F")"
if you could write me that code that would be great
thank you again for your time.
Hi again, when you have a chart it has a source range it looks at to get its values. When the data in the source changes it automatically updates. The only thing you may need to do is extend the range it looks at if you add more data.
Im not sure what you mean by c.copy.range("F:F")" . Do you want to copy the whole row of C and paste into F? Again, try the macro recorder to see the code for this.
every day i get a report i get a daily report a weekly and a monthly.
the report has (in order of columns) the persons department his name date and the five different figures.
right now i manually make a chart for each dept. consisting of the names and figures. i have five charts for each dept. the people change dept. daily and so this is for a daily process.
i want to write a macro that makes a chart based on the department the person is in?
againg i appreciate your help and if i can clarify aby further please ask i will try
1) Filter the data to only show the one you need
2) Copy that data to another sheet
3) Create a chart off the data
In order to do code you need to be specific about where ranges are copying from and where they are going to. If you use the macro recorder to achieve these three steps then you will have the bulk of the code. Then a small piece of code could be added to repeat the process (ie, filter on the next one, copy to a new sheet, create a chart). Run the macro to do the action for one department then post the code and Ill help with th loop part. You may wish to create a list of all the departments so its just a matter of looping through this to determine the filter criteria.
You could also investigate using a pivot chart - look that up in the help.