Hi, I have a list of percentages in row A, and I want to create a formula that, whenever the percentages don't add up to 100%, an even amount is added to each cell in Column A, and the number is returned in row B.
Basically, I want it to add a small amount to %11.77, %13.24, %12.93 etc., to make the total (currently %87.76) into %100
A
11.77%
13.24%
12.93%
13.84%
7.84%
7.69%
5.57%
6.22%
3.21%
2.95%
2.50%
Total 87.76%
Thank you in advance for you help!
Input Row 1, assuming that Row 1 should eventually add up to 100%
Sum Row 1 (87.76% in this case)
Get the inverse of Row 1 and 100% (12.34% in this case)
Divide the inverse by the # of cells summed
Add this new average value to each cell in Row 1, and display the output in Row 2.
Example:
=(1-SUM(A1:Z1))/COUNTA(A1:Z1)
, where1
= 100%,SUM(A1:Z1)
is adding up the entire Row 1, andCOUNTA(A1:Z1)
will count the number of non-blank cells, so it divides by the correct # of cells summed. I placed mine inM6
Example:
=A1+$M$6
,=B1+$M$6
, etc and repeat for all the cells in Row 2. If you cannot use a helper cell you can also replace$M$6
with the formula above.
Example #1:
=ROUND((1-SUM(A1:Z1))/COUNTA(A1:Z1),4)
, where the original formula has been surrounded byROUND( ... , 4)
, which is the precision you provided in your examples
Example #2:
=IF(SUM(A2:J2,K1+$M$6) <> 1,1-SUM(A2:J2), K1+$M$6)
whereK1
was the final cell of values in Row 1,$M$6
is the rounded formula, andA2:J2
are the output cells in Row 2 that have values.