- ©«¤l
- 406
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 453
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS 7
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2015-2-7
- ³Ì«áµn¿ý
- 2021-7-31
|
¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-12-31 02:32 ½s¿è
¦^´_ 4# lovenice831
·Pı¸ò§Ú·Qªº®t¤£¦h§a!?~~ §AµLªk¦¬ªþ¥ó?
§Ú¶Kµ{¦¡µ¹§A¡A§A°õ¦æ"¦¬³f³øªí"§Y¥i~«á±³£¬O°Æµ{¦¡
¿ý»sªº¥¨¶° 500¦h¦C¡AÀ³¸Ó¨S¤H¬Ý±o¤U¥h.....=.=¡A§A¥ý¸Õ¬Ý¬Ý¡A¦³º|¶ñ¦A»¡
¥t¥~¡A¦pªG§A¨S¿ìªk¤U¸ü§Úªºªþ¥ó¡A½Ð§â§Aªº³ø§i½d¥»"µy·L"קï¤@¤U
§â¦C19¡B20¡B21 ³£§ï¦¨¸ê®Æ¦C¡A¦C20§O¥Î²ÊÅé®Ø½u¡A
·í¸ê®Æ¦h¾l3¦C¡A§Úªºµ{¦¡·|¦Û°Ê½Æ»s¦C20
Dim Arr
Sub ¦¬³f³øªí()
Dim Brr(), R&, K%, LotNo$
Application.ScreenUpdating = False
Arr = ['Receiving DATA'!A4].CurrentRegion
For R = 2 To UBound(Arr)
If Arr(R, 5) <> LotNo Then ·sªí R: LotNo = Arr(R, 5): K = 0
K = K + 1: ReDim Preserve Brr(1 To 11, 1 To K)
Brr(1, K) = Arr(R, 9) '³fª«¦WºÙ
Brr(3, K) = LotNo '§å¸¹
Brr(4, K) = Arr(R, 7) 'ªO¸¹
Brr(5, K) = Arr(R, 8) '½c¸¹
Brr(8, K) = Arr(R, 10) '¹êª«¦¬³f
If R + 1 > UBound(Arr) Then ¥t¦s·sÀÉ Brr: Exit For
If Arr(R + 1, 5) <> LotNo Then ¥t¦s·sÀÉ Brr
Next R: Erase Arr: Erase Brr
Sheets("Receiving DATA").Activate
End Sub
Sub ·sªí(ByVal R)
Sheets("Receiving Report").Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = "Lot No. " & Arr(R, 5)
[C10] = Int(Arr(R, 2)) '¦¬³f¤é´Á
[F10] = Arr(R, 2) - [C10] '¦¬³f®É¶¡
[C11] = Arr(R, 3) 'Âd¸¹/³f¨®¨®µP
[J8] = Arr(R, 5) 'Lot Number
[J10] = Arr(R, 11) 'PO No.
[J11] = Arr(R, 14) 'BD t³d¤H
End Sub
Sub ¥t¦s·sÀÉ(ByVal Brr)
Application.ScreenUpdating = False
Application.DisplayAlerts = False
MyPath = ThisWorkbook.Path & "\"
Brr = Application.Transpose(Brr)
Rn = UBound(Brr): [G13] = Rn
If Rn >= 4 Then
Rows("21:" & 21 + Rn - 4).Insert Shift:=4
Rows(20).Copy
Rows("21:" & 21 + Rn - 4).Select
ActiveSheet.Paste
End If: [A10].Select
Application.CutCopyMode = False
[A19].Resize(Rn, 11) = Brr
[H13] = WorksheetFunction.Sum([E19].Resize(Rn))
ActiveSheet.Copy
With ActiveSheet
.Parent.SaveAs MyPath & .Name & ".xls", xlNormal
.Parent.Close 1
End With
ActiveSheet.Delete
End Sub
test Receiving Data 2020-1231.rar (49.93 KB)
|
|