I am trying to generate a graph of many trends for an excel spreadsheet that I have. I have attached an example showing what kind of things I am working with. Basically I have a lot of data for different projects and whether or not a project ended up being a success. What I want to do is isolate different variables to see what matters. For example in the attached worksheet, if I sort for only projects from the north region I can see that only a third of the projects were successes. I would want to do that for all of the regions and copy those statistics to another sheet so I would have something that shows the success percent of each region. Now that's easy enough to do by hand on this spreadsheet, but the actual one I am working with has many more columns and many more choices in each column. So what I was trying to do was create a macro that would run through a category (let's stick with regions) and change the filter to north, copy that to sheet 2, change the region to south, copy that to sheet 2, and do that for each unique value. Then after the macro runs, I would run it for the next column to gather the statistics I want.
That's the goal. The issue I am having is that it's very difficult to make the macro change the filter to each unique categorical value. I'm assuming I need to build an array of the unique values, then run a loop so that it will move through the values. I am not good enough with VBA to do this. If someone is capable enough to show me a code that would do what I am asking for this spreadsheet, then I would be extremely appreciative. But even just offering advice, or snippets of code, that would lead me in the right direction I would appreciate it. Thanks in advance for all of the help. Please ask questions if my request is not clear enough.
Bookmarks