This spreadsheet would keep track of the daily lab specimens in four racks. Each day of the week has four racks that sit in our fridge
I would use a different sheet for each day of the week, Does the fridge have a shelf for each day of the week?
On each Day Sheet, I would have four tables, one for each Rack. The tables should be shaped like the Racks
In Module TableDesriptions, Create constants that define each Table
Const Rack1Address As String = "B4:F7"
Const Rack2Address As String = "B10:F13"
In Code you can access each individual rack with
Set ActiveRack = Sheets("Monday").Range(Rack2Address)
For Inserts you can find the first Rack with an empty space by looping thru the tables on the sheet and
IF WorksheetFunction.CountA(ActiveRack) < 20 Then
For Each Cel in ActiveRack
If Cel = "" Then Cel =Barcode
Exit For
End If
For Finding a barcode, use
For each Sht in DaySheets
Set RackSlot = Find Barcode
For each ActiveRack
If Not Intersect(RackSlot, ActiveRack) Is Nothing Then
Use some simple math to find the actual rack space Barcode is in
The InsertFrm and FindFrm should return the Shelf, Rack Number and Space to the User