Calculate and Count

Capt.Ragnar

Board Regular
Joined
Jun 6, 2012
Messages
138
I need to count both the total number of locations with the same "Facility Type" in the same "Year". Then I need to count the number of locations with greater cost metrics than each respective location within the same "Facility Type" and "Year".

Sample below:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Location[/TD]
[TD]Facility Type[/TD]
[TD]Year[/TD]
[TD]Cost Metric Value
[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]A[/TD]
[TD]2013[/TD]
[TD]15.1[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]A[/TD]
[TD]2013[/TD]
[TD]16.2[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]B[/TD]
[TD]2013[/TD]
[TD]22.1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]C[/TD]
[TD]2013[/TD]
[TD]35.0[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]A[/TD]
[TD]2014[/TD]
[TD]15.7[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]A[/TD]
[TD]2014[/TD]
[TD]17.0[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]B[/TD]
[TD]2014[/TD]
[TD]19.8[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]C[/TD]
[TD]2014[/TD]
[TD]36.2[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]C[/TD]
[TD]2014[/TD]
[TD]37.3[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,223,993
Messages
6,175,845
Members
452,675
Latest member
duongtruc1610

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