Calculate percentage based on number of cells with a value

Charles_

New Member
Joined
Dec 12, 2012
Messages
32
Hello,

Apologies if this is repeated, I've tried searching for an answer but have not found anything.

I am looking for a way to calculate a percentage based on the number of cells with a value

example

[TABLE="width: 500"]
<tbody>[TR]
[TD]Sales person 1 [/TD]
[TD]Sales person 2[/TD]
[TD]Sales person 3[/TD]
[TD]Sales person 1 %[/TD]
[TD]Sales person 2 %[/TD]
[TD]Sales person 3%[/TD]
[/TR]
[TR]
[TD]100 items[/TD]
[TD]150 items[/TD]
[TD][/TD]
[TD]=average of number of cells with data, in this case only salespersons 1 and 2

In this case = 40% [/TD]
[TD]=average of number of cells with data, in this case only salespersons 1 and 2

In this case = 60% [/TD]
[TD]=determine that no there is no data for salesperson #3 , therefore leave blank[/TD]
[/TR]
</tbody>[/TABLE]

Thank you!
 
Fluff - Would you be so kind and tell me how to, when using =B2/AGGREGATE(9,6,B2,D2,F2) show blank or 0, either works, cells when there is no value to calculate and remove the #DIV/0! issue, please?

Thanks!
 
Last edited:
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
To make it "blank" use
=IFERROR(B2/AGGREGATE(9,6,B2,D2,F2),"")
or replace the "" with 0 to show 0
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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