Dynamic formula to calculate percentage

Belair58

Board Regular
Joined
Mar 31, 2005
Messages
95
Hello,

I currently have a formula at the end of column P that shows the percentage of a particular entry in the column.

=ROUND((COUNTIF(O2:O535,"Late")/COUNTA(O2:O535)*100),2) & " % Late"

I've been asked to add subtotals to this sheet, AND to have this formula at each subtotal line.

I'm currently working on looking for a blank cell in column D and pasting the formula into column P. I think I'm close on that.

Here's the problem: My current formula needs to only look at the range of the subtotaled lines. Can anyone give me an idea of how I would make the formula be dynamic for COUNTIF(O?:O?,"Late")

There will be a blank cell in Column O at each subtotal if that helps to find the range.

Any help would be greatly appreciated.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I've been asked to add subtotals to this sheet, AND to have this formula at each subtotal line.

The best way is a Pivot Table and provide the desired calculations at each desired Subtotal group. All the dynamics and formulas are taken care of by the Pivot Table. You only have to refresh the Pivot Table when data changes.
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,144
Members
453,021
Latest member
Justyna P

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