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!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
=SUMIF(A1:C1,"Salesperson 1",A2:C2)/SUM(A2:C2) should return the values that you want.

You can format to show a 0 result as blank.
 
Upvote 0
How about


Excel 2013/2016
ABCDEF
1Sales person 1Sales person 2Sales person 3Sales person 1 %Sales person 2 %Sales person 3%
21001500.40.60
Master
Cell Formulas
RangeFormula
D2=A2/AGGREGATE(9,6,$A2:$C2)
E2=B2/AGGREGATE(9,6,$A2:$C2)
F2=C2/AGGREGATE(9,6,$A2:$C2)
 
Upvote 0
Hi,

How about:


Book1
ABCDEF
1Sales person 1Sales person 2Sales person 3Sales person 1 %Sales person 2 %Sales person 3%
21001500.40.6
Sheet367
Cell Formulas
RangeFormula
D2=IF(A2,A2/SUM($A2:$C2),"")


Formula copied across.
 
Upvote 0
Hi Fluff,

Thank you but I am getting a result of 0 using the formula. I neglected the fact there are other columns in between the sales person data, trying to simplify it but appreciate this might have been counterproductive apologies.

I've tried using the below formula in red to no avail:
 
Last edited by a moderator:
Upvote 0
I've had to edit your post as it destroyed the thread.
Is this what your data looks like


Excel 2013/2016
BCDEFGHIJ
1Sales person 1Other dataSales person 2Other dataSales person 3Other dataSales person 1 %Sales person 2 %Sales person 3%
2100abc150abcabc0.40.6#VALUE!
Sheet2
Cell Formulas
RangeFormula
H2=B2/AGGREGATE(9,6,B2,D2,F2)
I2=D2/AGGREGATE(9,6,B2,D2,F2)
J2=E2/AGGREGATE(9,6,B2,D2,F2)
 
Upvote 0
Thank you and apologies not sure what happened with my post!

Still not working thou, I am getting a '1' as a result when it shouldn't.

Does the fact the values in cells B2, D2 and E2 are calculations based on other formulas matter?

Thank you
 
Upvote 0
What do you get if you use jtakw's formula like
=IF(B2,B2/SUM($A2:$G2),"")
Also what is the cell format for H2:J2
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
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