The new forums will be named Coin Return (based on the most recent
vote)! You can check on the status and timeline of the transition to the new forums
here.
The Guiding Principles and New Rules
document is now in effect.
Counting lots of stuff in Excel 2010
Okay, I have two columns I'm interested in. One has a zip code, one has either the text string "violent" or "non-violent". What I want is a tally of, for each zip code, how many times each string appears. So something like:
ZIP NON-VIOLENT VIOLENT
95608 37 42
95609 120 64
...and so on.
There are about 2500 rows per worksheet, and I'm going to have 12 worksheets, so counting manually is right out. I know I can sort by zip code, then manually hunt to the end of each run of a given zip and do a countif to count the Vs and NVs, but this is clunky (there are about 50 different zip codes per worksheet) and it seems like there should be a better way. I'd prefer not having to write any VB code, because I haven't done that in forever and don't feel like relearning the process. Anyone know of a good means of doing this with operators and/or clever sorts or anything?
I submitted an entry to Lego Ideas, and if 10,000 people support me, it'll be turned into an actual Lego set!If you'd like to see and support my submission,
follow this link.
0
Posts
Also, you might want to consolidate the twelve tables into a single data table.
If the table looked like this:
95608 violent
95608 violent
95608 non-violent
95810 violent
95810 non-violent
95810 violent
95810 violent
95821 violent
95821 non-violent
95823 violent
...then I would want to get data that looked like this:
I have considered merging the worksheets into one, and will do that if it saves time. I need to keep track of what came from where, but I can just throw another column in there to track the month. (The worksheets are broken up by month.)
edit: Also, it looks like pivot tables will be a good way to do this. I'm futzing about with them right now, and hopefully I can figure out how to properly wrangle those numbers.
Click the Insert ribbon
Click pivot table
insert pivot table on a seperate sheet
Drag zipcode to row label
Drag the header for violent/nonviolent to "Column Labels" and "values"
click on the column header in "values" and change the "Value Field Settings" to Count
you could probably do it with subtotals too, but pivot tables are prettier.
I was doing something similar using Match and then Filtering out the N/A. Actually, I still do that. I need to update my spreadsheet. Thanks guys!
Steam Me