Rounding values to 2 decimel while keeping total 100%

Fusionista

New Member
Joined
Apr 17, 2024
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hello!
In the attached file the values in column K ("Unique value %) should be rounded to 2 decimal but the "Total %" in column L should still stay exactly 100%.
So I can't use directly the ROUND function, as it messes up the 100 value, like this.

But is there a way to propotionally add/remove value to round the numbers to 2 decimal and keep the total value 100?

Also there could be an instance where there are 3 values all 33,333333%. So rounding them to 100 could be an issue. Right?

So I created a new worksheet with some data. The original worksheet has many-many more rows. But I chose those three clients.
Also started with a helper column S, but have no idea how to continue from there on...

The problems are:

1.The column M should equal 100 for each client, but ALS has only one value in one month. But the calculation still gives 100 for it.
So there's something wrong with the formula?

2. Client UMM has a total of 100,08 in column P, so the excess 0,08 should be distributed between the values of client UMM in column P.

3. Client VAU has a total of 99,99, so 0,01 should be somehow added to one value in column P.

It should continue with extra helper columns, but what should be the next one then?

Uploaded the Excel file here: Easyupload.io - Upload Files and Share Them Easily
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Formatting doesn't change the fact that the values still have more than 2 decimal hidden. But I have to use 2 decimal places and somehow add/substract whatever is left to have 100% total
why? If you only display format to .## the formulas work the way you need. It is just that the "apparent" sum does not match.
 
Upvote 0
Actually column L instead of C. Because column L has the WBS Element and I only have to use unique values there for column O working hours
also, i dont see how L is filtering the way you want. explain this:
Book1.xlsx
JKLMNO
1Cost Element FromCost Element ToWBS ElementReceiver %Total h of every monthTotal WBS
2410000443333XYLD013.693.693.69
34100004433332006420.41 3.39
44100004433332006430.41 3.39
54100004433332006620.41 3.39
64100004433332006650.41 3.39
Sheet1
Cell Formulas
RangeFormula
N2:N6N2=IF(E2<>E3,SUMIFS(M:M,E:E,E2,I:I,I2),"")
O2:O6O2=IF(COUNTIFS(I$2:I2,I2,L$2:L2,L2)=1,SUMIFS(M:M,I:I,I2,L:L,L2),"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
N1:N1196Expression=AND(ISNUMBER($N1),$N1>99.99)textNO
N1:N1196Expression=AND(ISNUMBER($N1),$N1<99.99)textNO
 
Upvote 0
why? If you only display format to .## the formulas work the way you need. It is just that the "apparent" sum does not match.
Not really sure, but as it's for accounting and they can't use values with more than 2 decimal places. So that's the reason why the column P eventually has to sum up to exactly 100% for each client
 
Upvote 0
are you on the accounting team? If not, its apples an oranges then.. You're changing the actual values to fit your round peg into their square hole. Don't change the actual digit % to fit a different area's needs.
 
Upvote 0
I would bet they have rounded their hours in your report.
somebody actually reported their time worked to the second? :
Cell Formulas
RangeFormula
V8V8=IF(P8="","",IF(COUNTIFS(P$2:P8,">0",I$2:I8,I8)=SUM(--(FILTER($O$2:$O$50000,($O$2:$O$50000>0)*($I$2:$I$50000=I8),0)<>"")),SUM(P$2:P8)/(1+COUNTIF(V$1:V7,">0")),""))
U9U9=TEXT(3.69/24,"hh:mm:ss")
V9V9=FORMULATEXT(U9)
 
Upvote 0
It's some kind of a clocking system, so I guess it's very precise :D
I'm sorry, I don't think it is right to change data to fix something for reporting. you can take the difference after the round in the total and add it to
rounded(sum of pct) - (sum of pct) but how will you ever know the needed precision. a differnce of .001 could further mess up your calculations. I would ask your accounting team to give you the methodology of how they want that done (or how they do it) and document it. So that when they come to you and ask why record #1 is .27% and record #40 is .28% with the same raw number what will you do? I am fetching my ten foot pole.
 
Upvote 0

Forum statistics

Threads
1,223,881
Messages
6,175,161
Members
452,615
Latest member
bogeys2birdies

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