[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Complex Excel lookup formula

Posted on 2011-05-02
5
Medium Priority
?
348 Views
Last Modified: 2012-05-11
Lets say I run 3 stores plus a Distribution Centre (DC). Whenever a customer orders inventory at each store, I want to update that store's remaining inventory.  Also, if the customer orders more inventory than what the store has in stock, then i want the formula to reduce the inventory from the DC instead.  

Here is my scenarios for this example: (note: I only used 4 customers in this example, but i need the formula to have the ability to deal with several more than this).

Store1 Inventory: 200
Store2 Inventory: 200
Store3 Inventory: 200

Distribution Centre (DC) Inventory: 1000

Action1
Store1_Customer1 buys 150 items, so I need to reduce Store1 inventory down to 50.  Since there is stock remaining at the store, I do not need to draw down stock at the Distribution Center (DC) at this time.

Action2
Store2_Customer2 buys 250 itmes from store2, so I need to reduce Store2 inventory down to 0 items, and reduce the DC inventory down by 50 from 1000 to 950.

Action3:
Store2_Customer3 buys 100 itmes from store2, since there is 0 inventory remaining at Store2 I need to reduce the DC inventory down by 100 items from 950 to 850.

Action4
Store3_Customer4 buys 250 items from store3, so I need to reduce this store's inventory down to 0, and reduce the DC inventory by 50, from 850 to 800.


I attached a screen print of my worksheet to give you an idea of the layout.
Note:  The yellow-highlighted area is where I need the formulas to update the remaining inventories.


Thanks

excel-formula.JPG
0
Comment
Question by:jtencha
5 Comments
 
LVL 22

Accepted Solution

by:
Nico Bontenbal earned 600 total points
ID: 35505568
See attached file. I've added two 'helper' colums. 'Total needed' and 'From DC'. With these extra columns there is no need for complex formula's.
Inventory.xlsx
0
 
LVL 6

Expert Comment

by:royhsiao
ID: 35505587
Please review the worksheet.
ExcelLookup-Formula.xls
0
 
LVL 6

Expert Comment

by:royhsiao
ID: 35505619
Please review the screen shot. I use sumif to find out the order for each store. I check if the store order is greater than the store inventory. If the store order is greater than the store inventory, the store inventory goes to 0 and DC invenotry will be reduce by the extra order.
ExcelLookup.JPG
0
 
LVL 6

Assisted Solution

by:sijpie
sijpie earned 400 total points
ID: 35505652
You can do this with some formulas and extra columns. But maybe not efficient whenthat you can expand the sheet with lots of clients and products.

See here result and formulas

http://screencast.com/t/lbv9y4RL

Alternative , itcan be done though is that for every customer added to the list, a macro is run that does the calculation and updates the yellow fields
0
 

Author Closing Comment

by:jtencha
ID: 35507075
Thanks for the help.  I think these formulas will work.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question