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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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,223,886
Messages
6,175,189
Members
452,616
Latest member
intern444

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