Doe anyone know how to use pivot tables to do this or some other slick way to generate such a report? It will help me figure out if I’ve assigned too many players to a given position for a given quarter.
You’ll need to enter 4 formulas, 1 for each quarter
For x, enter the array corresponding to your first table for the quarter in question, making sure to use F4 to add dollar signs -> $B$2:$B$3
For y, enter the cell with the position K in it -> C8 for example (no $ here, or just on row, but not on column)
So, you’ll enter these four formulas under the K in your second chart shown above, and then drag them out to the right.
Then you’re done.
eta: you could get around having to enter 4 different formulas by building offsets into the countif function or by reversing the layout of the original chart, but it’s only 4 things, so whatever
It can be done fairly easily in a pivot table, but I’d suggest changing the position names to numbers–if for no other reason than it would make it easier to read. When you build the pivot table, you’ll put the positions into the “column labels” section, and the quarters into the “row labels” section of the pivot table field list. Changing “K” for 'keeper to “1”, “SW” for sweeper (?) to “2”, and so on stops you from having to specially sort them…otherwise you’d have to have a custom alphabetical sort.
Format the column values to “sum of items”, and you should be good to go.
I’m hoping to use the data in the table to build the column headings, though. I could build a second table with the headings “K”, “SW”, etc., but since that data is already in original table, I want my pivot table to automagically build that. I can do this with a different stat program I have, but I want to be able to share this table with others who won’t have the stat program.
DukeHow do I put “K”, “SW”, etc. as the column labels? When I select the data area, I don’t see an option to say “these values are the labels”.
Absolutely. However, this really isn’t a question about how to this for this particular instance, as I had already found a way to do it by using 4 pivot tables. I was hoping to find a way to do it that will save me time the next time I need to do something similar but maybe that has 30 or 40 different categories instead of 9. I do appreciate the response, though. Your countif() option was not one I had previously known and it better than the solution I came up with.
Fair enough - I tend to prefer formulas over pivot tables for a bunch of reasons.
But really, if you want to deal with large amounts of data and outputting it in different forms (sorting by different cateories like you’re talking about), Access is a much more powerful tool.
Then drag the forumla to cover the same cells as where the data is entered on the other sheet. Note the use of the $ signs. If your original sheet isn’t Sheet1, you’ll need to adjust as necessary.
This does require the use of a duplicated chart. If you want to actually move the Xs within the same chart, you’ll need to use a macro.
eta: the macro would just create a sheet set up like this, then copy as values over the original sheet, and then delete the sheet with the formulas