Analysis of states and income levels
I have a column of states and a column of income, and I need to find the median income for each state. A sample of my two columns of data would be something like this:
CA - $80,000
CA - $23,000
CA - $30,000
AZ - $50,000
AZ - $60,000
AZ - $70,000
FL - $55,000
FL - $65,000
FL - $95,000
Is there a way to do this dynamically? I can sort by state and select the fields manually, but I'd really like to know if there's a way to do it using a function as I'll probably need to repeat this process as new data comes in.
So far this is what I've come up with, but it doesn't seem to work:
=MEDIAN(IF(A:A="CA",B:B))
Edit: Ok, nevermind, solved. The above function is correct, just needed to hit CTRL SHIFT ENTER.
Last edited by knownunknown; 01-22-2011 at 01:07 PM.
|