Newer user needs help with a formula

EdmontonGuy

New Member
Joined
Jun 24, 2014
Messages
1
I’m new to Excel and I’m fiddling with a formula that I could use a little help with. I’ll layout in basic terms where I’m at with the workbook.
Issue: Big Joe’s Fruit Vendors has 4 vending trucks that they sell fruit from: Big Truck (A), Medium Truck (B), and two small trucks (C and D). Each truck is required to keep the proper amount of fruit types, so when one type gets low they must order more, and when they have too much of one type of fruit they must sell more of that fruit.
Because of the type of truck, there are truck types that can only sell certain types of fruit, and in other cases, fruit types are interchangeable with truck type.
Big Joes carries the following fruits on the following trucks:
Big Truck: Bananas, Oranges, Avocados, Cherries, Raspberries (A)
Medium Truck: Watermelon, Dragon Fruit, Grapes, Cherries, Raspberries (B)
Small Truck: Bananas, Grapes, Cherries (C)
Small Truck: Raspberries, Grapes, Cherries (D)
Each truck has a target percentage for each fruit type, however there must also be a master list that matches with the overall percentage from all the trucks so that Big Joe doesn’t order too much or two little of each fruit when he restocks his trucks. Each month Big Joe adds money from his profits to buy fruit for each truck.
Money for new fruitCell C1
Big TruckTarget AllocationCurrent Fruit Amount to order or sellNew total
Column B
Bananas (Row 6)5%88%-35
Oranges10%1111%-110
Avocados15%1515%015
Cherries30%2929%130
Raspberries40%3737%340
100%100100%100

<tbody>
</tbody>

Assuming ‘Bananas’ are on row 6 and ‘Target’ is in column B, and cell C1 is the dollar amount Big Joe is adding to his monthly inventory:
The formula I’m currently using for the amount to buy or sell is =IF($C$11+$C$1)*B6-C6,0)

If we then look at all the trucks and have a separate calculation for Cherries for each truck, assuming we have a set percentage of the total fruit of each type that we want in total inventory:
TRUCK TYPECHERRIESTOTAL FRUITACTUAL FRUITFRUIT TO ADD
Big Truck (A)307.0%6.9%1
Medium Truck (B)209.0%8.8%2
Small Truck (C)253.0%3.0%0
Small Truck (D)255.9%5.9%0

<tbody>
</tbody>

The formulas I am currently using, assuming ‘Big Truck (A)’ is on row 7, ‘Total Fruit’ is column c, actual fruit is column d, fruit to add is column e, and the total inventory of all of the different types of fruit is located in cell B26:
Cell D7 - =IFERROR(B7/$B$26,0)
Cell E7 =(D7-C7)*$B$26*-1
The formula I’m seeking is one that would allow Big Joe to set his inventory targets for each truck, allow him to add inventory to each truck, but then would also allow the ‘Total Fruit’ column on the overall fruit inventory sheet to be an updated target based on the inventory targets set for each individual truck.

Thanks for any help.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

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