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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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,214,813
Messages
6,121,706
Members
449,048
Latest member
81jamesacct

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