Tracking Expiration Dates

katiapro93

Board Regular
Joined
Jun 25, 2009
Messages
140
Hello everyone, it has been a while, and I am afraid my mind is blank. I need ideas on the best way to set up an Excel worksheet that tracks expiration dates on products that we receive. I have a worksheet that I throw in the content of all POs and the receiving information, along with the current inventory. The issue is that on that sheet, items can and should be duplicated as we reorder them. Also, everyday I lookup the current inventory and thus, it is not a steady number. So my worksheet looks something like:

item#, Description, Qty received, Expiration date, Inventory upon arrival, current inventory

I was thinking, if I can have one sheet with just everything thrown in and then each item have its own ledger, problem with that is that we have over 2000 items and even doing a pivot, I would have to do 1 sheet for each item. Too long.

Any ideas?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
reset the constants for your fields :
kCOLdate : the col Letter with the date to look at
kCOLresult :the col letter where to write the result
Code:
Sub FindExpiredDates()
Dim iRows As Long, iFldNum As Long, iResultOFF As Long
Dim vExpDate
Const kCOLresult = "K"
Const kCOLdate = "G"
iFldNum = Range(kCOLresult & "1").Column
iResultOFF = iFldNum - Range(kCOLdate & "1").Column
vExpDate = InputBox("Enter Expire Date", "Find Expired Items")
If vExpDate = "" Then Exit Sub
vExpDate = CDate(vExpDate)
'clear results col.
Columns("K").ClearContents
Range("K1").Value = "RESULTS"
  'get #rows
Range("A2").Select
iRows = ActiveSheet.UsedRange.Rows.Count
'MsgBox iRows
Range(kCOLdate & "2").Select
While ActiveCell.Row <= iRows
If ActiveCell.Value > vExpDate Then ActiveCell.Offset(0, iResultOFF).Value = vExpDate

ActiveCell.Offset(1, 0).Select 'next row
Wend
 'filter results
ActiveSheet.Range("A1").AutoFilter Field:=iFldNum, Criteria1:=vExpDate
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,525
Members
448,969
Latest member
mirek8991

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