Count cells in a range dynamically?

cpaavola

Board Regular
Joined
May 13, 2009
Messages
90
Hopefully someone out there can help me out. It's a bit awkward to explain, but I'll do my best! :)

Below is a sample of 20 employees sorted by their total sales:
EmployeeTotal SalesJune SalesJuly Sales
3483
74610
15454
4375
9354
16352
17355
8349
1332
11321
12325
18329
193212
62712
10275
13276
14278
202711
22511
5233

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

Each column has numbers highlighted in green to show who is over an "elite" number, as defined by one of our sigma equations:
Total SalesJune SalesJuly Sales
Elite4010

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

When I sort the same grid by "June Sales" it shows me which number of elite "Total Sales" employees are also elite "June Sales" employees. In this case, only one of them (employee 7):
EmployeeTotal SalesJune SalesJuly Sales
193212
62712
202711
22511
74610
8349
18329
14278
13276
4375
17355
12325
10275
15454
9354
3483
5233
16352
1332
11321

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

I have two requests:
  1. I would like to have a formula that counts the number of employees elite in "Total Sales" who are also elite in a particular month's sales.
  2. I would like this formula to be able to dynamic, so if I sort by subsequent months (July, for instance) it would give me the same result.

I hope this all makes sense!
 
The macro shouldn't be too coplicated just wanted to make sure you were ok wth that option before I had a look at it.

When you select the month would you like it to only show thats months column as well?
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
actually if you have the columns for each month anyway you can just add the sum to the top of each column with:

=SUMPRODUCT(($B3:$B14>AVERAGE($B$3:$B$14)+STDEV($B$3:$B$14))*(E3:E14>AVERAGE(E3:E14)+STDEV(E3:E14)))

This is where your data starts in row 2 and the total column is in B.
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,693
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top