Batch Inventory in excel

vikash_05

New Member
Joined
Apr 12, 2020
Messages
11
Office Version
  1. 2010
Platform
  1. Windows
Hi, can any one help me with my office batch inventory solution in excel.
Dispatch data is available and i need to summarize it in batch summary.


Thanks a Lot.
ScreenHunter_22 Apr. 12 20.05.png
 
First sheet is "Dispatch Data"
2nd sheet is "Size-8"
3rd sheet is "Size-9"
4th sheet is "Size-0"

total 4 sheets
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How many Batch-Qty columns can you have, only 4 or can there be more?
You can put the data here with XL2BB tool. That way I can use the data, I cannot copy it from an image.

Put here the data from the "Dispatch Data" and "Size-8" sheet to see in which cell they start.
 
Upvote 0
DISPATCH DATA
New Microsoft Excel Worksheet.xlsx
ABCDEFGHIJKL
1Dispatch Data
2DateChallan NoSizeBatch No.QtyBatch NoQtyBatch NoQtyBatch NoQtyTotal
301-Apr54321CC-101600C-1022500C-1052000C-1045005600
401-Apr54322CC-1021000C-1041300C-10612003500
502-Apr54323AA-201300A-20315001800
603-Apr54324BB-3011000B-3021200B-3035002700
704-Apr54325AA-201200A-203500700
804-Apr54326BB-303500B-3027001200
905-Apr54327CC-1021100C-104600C-1065002200
1006-Apr54328BB-3011200B-3051500B-307600B-3048004100
1107-Apr54329CC-1021100C-101600C-1035002200
1254330
1354331
1454332
1554333
1654334
1754335
1854336
1954337
2054338
2154339
2254340
2354341
2454342
Dispatch Data
Cell Formulas
RangeFormula
L3:L11L3=E3+G3+I3+K3
 
Upvote 0
SUMMARY SHEET FOR SIZE-C
New Microsoft Excel Worksheet.xlsx
ABCDEFGHIJKLMNOPQRSTUV
1Batch NoBatch QuantityLoading-1Loading-2Loading-3Loading-4Loading-5Loading-6TotalBalance
2DateCh No.QtyDateCh No.QtyDateCh No.QtyDateCh No.QtyDateCh No.QtyDateCh No.Qty
3C-10115000
4C-10220000
5C-10321000
6C-10418000
7C-10519000
8C-10615000
9C-10716000
10C-10817000
11C-109
12C-110
13C-111
14C-112
15C-113
16C-114
17C-115
18C-116
19C-117
20C-118
21
22
23
24
Size-C
 
Upvote 0
Sheet Names:
Dispatch Data
Size-A
Size-B
Size-C

uploaded xl2bb data. hope its okay.
 
Upvote 0
uploaded xl2bb data. hope its okay.

That's perfect.

You could answer this:
- How many Batch-Qty columns can you have, only 4 or can there be more?
- How many "Size" sheets are you going to have?
- How many "Loading" could a "Batch No" have?
- How many rows will you probably have on the "Dispatch Data" sheet?
 
Upvote 0
You could answer this:
- How many Batch-Qty columns can you have, only 4 or can there be more? It doesn't matter it can be much more.
- How many "Size" sheets are you going to have? It doesn't matter it can be much more.
- How many "Loading" could a "Batch No" have? It doesn't matter it can be much more.
- How many rows will you probably have on the "Dispatch Data" sheet? It doesn't matter it can be much more.

With the following macro, it doesn't matter how many columns or rows or sheets.
The name of the sheets must be equal to "Size-" and the letter that is in column C of the sheet "Dispatch Data" ex: "Size-A"

VBA Code:
Sub Batch_Summary()
  Dim sh1 As Worksheet, sh2 As Worksheet
  Dim dic As Object, dic2 As Object, ky As Variant
  Dim i As Long, j As Long, a As Variant, b As Variant, c As Variant
  '
  Application.ScreenUpdating = False
  Application.DisplayAlerts = False
  '
  Set sh1 = Sheets("Dispatch Data")
  Set dic = CreateObject("Scripting.Dictionary")
  Set dic2 = CreateObject("Scripting.Dictionary")
  dic.CompareMode = vbTextCompare
  '
  a = sh1.Range("A3", sh1.Cells(sh1.Range("A" & Rows.Count).End(3).Row, sh1.Cells(2, Columns.Count).End(1).Column - 1)).Value2
  For i = 1 To UBound(a)
    dic2(a(i, 3)) = Empty
    For j = 4 To UBound(a, 2) Step 2
      dic(a(i, j)) = dic(a(i, j)) & "|" & a(i, 1) & "|" & a(i, 2) & "|" & a(i, j + 1)
    Next
  Next
  
  For Each ky In dic2.keys
    Set sh2 = Sheets("Size-" & ky)
    b = sh2.Range("A3:A" & sh2.Range("A" & Rows.Count).End(3).Row).Value2
    ReDim c(1 To UBound(b), 1 To 1)
    For i = 1 To UBound(b)
      c(i, 1) = Mid(dic(b(i, 1)), 2)
    Next
    With sh2.Range("C3").Resize(UBound(b), 1)
      .Value = c
      .TextToColumns , xlDelimited, , , False, False, False, False, Other:=True, OtherChar:="|"
    End With
  Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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