Solved

# Complex Excel lookup formula

Posted on 2011-05-02
299 Views
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
Question by:jtencha

LVL 22

Accepted Solution

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

ExcelLookup-Formula.xls
0

LVL 6

Expert Comment

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

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

Thanks for the help.  I think these formulas will work.
0

## Featured Post

### Suggested Solutions

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.