[Help] formula percentages

vi28

New Member
Joined
Sep 25, 2022
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Dear gents,
I'm managing the supplies for my small food truck and I would appreciate some help with a formula.
I always require the same percentages / weight of supplies in kilos (20% flour, 45% rice and 35% spaghettis).
Each month I buy different amounts based on whatever is better priced, but I would like some help with a formula to figure out what I still need to buy to get my amounts even (column D)
InventoryTarget RatioCurrent (Kg)Required shopping to reach target %
Flour
20%​
14.5​
?
Rice
45%​
33​
?
Spaghettis
35%​
25.5​
?
TOTAL
73​
?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Each month I buy different amounts based on whatever is better priced, but I would like some help with a formula to figure out what I still need to buy to get my amounts even
Information is too less to understand what you want in Column D.
 
Upvote 0
Information is too less to understand what you want in Column D.
@SanjayGMusafir - I want to automate column D. Here's the fully manual process I use today as a fully manual process:
Step 1. After I buy another 5KG Flour and 10KG Rice I will have an inventory imbalance, where the biggest imbalance is of +6% flour
Step 2: So, I take the flour amount as my basis for my calculation. Now the 24.5 KG flour becomes my 20% and I use it to calculate what are the other 45% and 35% percentages based on it in column E
Step 3: I deduct the values in column E from what I have in Column B, so I know what amounts I still need to buy in column D. I would like to automate the whole process for column D

2022-09-26_Inventory_Calculation.xlsx
ABCDEFG
1ItemTarget ratioCurrent in KGRequired purchase in KGRequired for ratio in KGCurrent ratioRatio inbalance
2Flour 20.0%24.5024.526%6%
3Rice45.0%43.01255.146%1%
4Spagettis35.0%25.51742.927%-8%
5TOTAL93.0
Sheet1
Cell Formulas
RangeFormula
D2:D4D2=E2-C2
E2E2=C2
F2F2=C2/C5
G2:G4G2=F2-B2
E3E3=B3*C2/B2
F3F3=C3/C5
E4E4=B4*C2/B2
F4F4=C4/C5
C2C2=14.5+10
C3C3=33+10
C5C5=SUM(C2:C4)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:D4Cell Value>0textNO
G2:G4Other TypeColor scaleNO
 
Upvote 0
Understood. I also use same thing for my calculation. Shall revert back soon (in around 3 hrs) with an appropriate solution. I have to rush somewhere.

Thanks for your patience.
 
Upvote 0
Check the solution below -

Things to note -
  • Instead of 1 column E, I have used 2 column E & F
    • to avoid any circular reference or accidental overwriting the formula.
  • Column I - I have used just to show you that the formula is calculating right.
  • MOST IMPORTANT -
    • You MUST fill any one item in column F that you bought/buy first.
    • Rest it shall calculate in Column E
    • Posting more than 1 item in column F shall give you error.
  • AND -
    • All three cells E2:E4 have different formula in them. Must remember that.
All Records.xlsb
ABCDEFGHI
1ItemTarget ratioCurrent (in KG)Required purchase in KGRequiredPurchased (Fill any 1 you bought)Current ratioRatio inbalanceRatio Check (Just to Verify)
2Flour 20%24.50(1.50)23.0023.0026%6%20%
3Rice45%43.008.7551.7546%1%45%
4Spagettis35%25.5014.7540.2527%-8%35%
5TOTAL93.00115.00
Sheet1
Cell Formulas
RangeFormula
G2G2=C2/C5
H2:H4H2=G2-B2
I2:I4I2=E2/$E$5
G3G3=C3/C5
G4G4=C4/C5
C2C2=14.5+10
C3C3=33+10
D2:D4D2=IF(OR(E2=C2,E2=""),0,E2-C2)
C5,E5C5=SUM(C2:C4)
E2E2=IFS(COUNTBLANK($F$2:$F$4)=3,"",COUNTA(F2:F4)>1,"Fill any 1 only",F2<>"",F2,$F$3<>"",$F$3/$B$3*B2,TRUE,$F$4/$B$4*B2)
E3E3=IFS(COUNTBLANK($F$2:$F$4)=3,"",COUNTA(F2:F4)>1,"Fill any 1 only",F3<>"",F3,$F$2<>"",$F$2/$B$2*B3,TRUE,$F$4/$B$4*B3)
E4E4=IFS(COUNTBLANK($F$2:$F$4)=3,"",COUNTA(F2:F4)>1,"Fill any 1 only",F4<>"",F4,$F$3<>"",$F$3/$B$3*B4,TRUE,$F$2/$B$2*B4)
 
Upvote 0

Forum statistics

Threads
1,223,713
Messages
6,174,039
Members
452,542
Latest member
Bricklin

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