Re-distributing numbers against a total value.

DazCD

New Member
Joined
Aug 19, 2024
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Good morning, hopefully the title makes sense but I'll try my best to explain:

Basically, I have a 1KG bag of mixed sweets, the 1KG bag is made up of several components.

I'm pulling the information from our ERP system for the 'quantities' (What these quantities are based upon, I don't know - It's just the information I have)

So, I have the following Bill of Materials:
ComponentQTYDescriptionFormulaFormula resultFinal QTY
N923810.7Green Paint Ball Mallows 900g=0.9*0.70.6310% (0.63/6.033)*100
N941370.525Jelly Beans 3kg=3*0.5251.57526% (1.575/6.033)*100
N944130.473Gingerbread Men Flavoured Candy 3kg=3*0.4731.41924% (1.419/6.033)*100)
N944230.473Soft Candy Canes Mini 3kg=3*0.4731.41924% (1.419/6.033)*100)
N990030.33Fizzy Christmas Trees Red & Green 3kg=3*0.330.9916% (0.99/6.033)*100
6.033
100%


To calculate the quantities for each item, I'm multiplying the size of the bag (from the description) against the QTY (Col B) using the formula in Col D, The results are as Col E.

In Col F, the 'Final QTY', This is calculated by dividing each result (Col E), by the total sum of the values in Col E, (6.033 being the total SUM), which is then expressed as a percentage.

The issue I'm having is that I want these % values to be expressed to to the nearest multiple of 5 whilst still equaling 100. I've tried =CEILING & ROUND formulas to try it but I can't figure it out.

So my final %'s might look look like:


10%
25%
25%
25%
15%
100%

Thank you in advance for any replies.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I don't know why but it's put the figures in my table in the incorrect place, the
6.033100%

These should be underneath Col E & F respectivley.
 
Upvote 0
How about this formula?

Book1
AB
1Final QTYRounded value
21010
32625
42425
52425
61615
Sheet1
Cell Formulas
RangeFormula
B2:B6B2=INT((A2/5)+0.5)*5
 
Upvote 1
Solution
Hello, what would be the rule if there are two same values that are supposed to be rounded down (22 %), i.e. the result would then be 95% instead of 100%?
 
Upvote 0
@hagia_sofia it nearly always works out. For example with 22, 22 the other 3 numbers would sum to 56, so say 18, 19, 19. In that case the rounding will leave 5x20=100.
 
Upvote 0
I've tried some testing using your formula @myall_blues, it appears to work - absolutely fantastic, thank you!

As for a rule for the values not adding up to 100, I don't know, I'm not amazing at Math's but I'll cross that bridge should it occur.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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