I have a table of number sof high-rise buildings in the US (attached here). What I'm trying to do (with formula or code) is to compute how many buildings there are (in all the US) with 14 floors. How many with 15 floors. Etc. with each number of floors. I am beginner-level with VBA. I started by sorting everything according to number of floors, then writing a For loop to go through the rows and start adding the numbers, but I ran into trouble that I didn't know how to handle (know when it's the first instance of that number of floors in order to start counting anew form there, etc.). You can see my code (very preliminary) in the file.

I need something like this (for all numbers of floors):

14 floors - 400 (buildings)

15 floors - 250

...

After that, I also need to do the same thing, but this time divided by States, meaning:

AK:

14 floors - 100

15 floors - 50

(for each state and for each number of floors)

I would be really glad for help with this issue.. too many little details that I'm not sure how to handle.

Thanks a lot!

Here's the file (just remove spaces.. the file is too large for attachment):

ht tps: //docs . google . co m/file/d/0B-4vUrIGZBqoMktsN1VYSU5aSDg/edit?usp=sharing