How to run a query in Excel 2007?
January 25, 2008 8:20 AM Subscribe
How do I group values by a variable in Excel 2007? Essentially, I want to run a query.
posted by desjardins to Computers & Internet (8 answers total) 3 users marked this as a favorite
I have a table with columns like city, state, population, average income, average house price. This table is constantly being updated and amended, with the new info tacked on at the end. So for example, I might have (all numbers completely pulled out of my ass):
Milwaukee, WI, 600000, 40000, 150000
Bozeman, MT, 30000, 25000, 100000
Chicago, IL, 2000000, 60000, 200000
Madison, WI, 100000, 50000, 125000
Springfield, IL, 100000, 40000, 100000
I need to group the cities by state and calculate stuff like total population, average income and house price by state. So I want to end up with
WI, 700000, 45000, 137500
IL, 2100000, 50000, 150000
I'm familiar with Access but I can't use that for this project because the end user only has access to Excel (2007). I understand SQL (mostly), but I don't know if it can be used in Excel and if it can, I don't know where to put it. I don't know any other code well enough. Please, if you have some magic line of code that will work, tell me exactly where to put it, because I won't know.