Inventory batch switching when quantity expires

DaveCVB

New Member
Joined
Dec 29, 2021
Messages
2
Office Version
  1. 365
  2. 2019
Platform
  1. MacOS
Hello all

Hoping someone can help me here.

We have a sales sheet that uses VLOOKUP to find the batch number to each product. So when someone adds a sale for beer it finds the correct batch number which helps to correctly invoice. However sometimes we'll only have 1 case left, and someone adds 2 cases to the sheet and its invoiced as such and it creates a deficit and gain across batches. We've put a condition in where if quantity is < 0 it'll return an error, and once error is reached you have to manually change the batch numbers

We're trying to find a formula where when the quantity of batch 1000 reaches zero it will return batch 1001 and so on.

Currently we have
Excel Formula:
=IF(VLOOKUP(G1,A1:C9,3,)=0,VLOOKUP(G1,A1:C9,2),VLOOKUP(G1,A1:C9,2,))
(G1 is just for testing at the moment) where if we make the quantity of C2 = 0 then the batch moves over to 1002.

Is there an easier way for this to all come together?


Screenshot 2021-12-29 at 13.47.46.png
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCDEFGH
1
2Beer10000Beer1001
3Beer100120
4Beer100215
5Beer100340
6
Data
Cell Formulas
RangeFormula
H2H2=INDEX(FILTER(B2:C10,(A2:A10=G2)*(C2:C10>0)),1,1)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,256
Members
448,558
Latest member
aivin

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