½Ð°Ý«e½ú¤@Ó¦nÃøªºVBA³øªí³]p
- ©«¤l
- 6
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 8
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-10-15
- ³Ì«áµn¿ý
- 2015-9-23
|
½Ð°Ý«e½ú¤@Ó¦nÃøªºVBA³øªí³]p
¦U¦ì«e½ú¡A¤p§Ì¬°¤F¤u§@»Ý¨D¡A¶R¤FVBAªº®Ñ¡A¼g¤F¤@ÓÄꪺVBA¥h°õ¦æ¡A²£¥Í»Ýnªº³øªí
¦ý¦³¤Ó¦hªº°ÝÃD¤p§Ì¨S¿ìªkµu®É¶¡¬ð¯}¡A¦ý¦ÑÁó¤Snªº«D±`«æ¬°¤F¤p§Ìªº¶º¸J¡A¤p§Ì¤£±o¤£
¨Ó©M¦U¦ì«e軰¨D±Ï¡A½Ð¦U¦ì«e½úÀ°¦£¡A¸÷Á¡I«ô°U«ô°U¡C
VBA.rar (24.31 KB)
|
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 1# tsou516
±NSheet1.B01~B15ªºÈ©ñ¤J³W©wªºSheet2.LÄæ~TÄ檺¦ì¸m(¦³ªºn¬Û¥[)
B01~B15¦³15Äæ ,LÄæ~TÄ榳9Äæ,³oÄæ¼Æ¤£¹ïµ¥,
§A»Ý»¡©ú D-Pak,SO-8,PMPAK,SPR-PAK ,SOT-23,SOT-26,TO-220,TO-263 ªº±ø¥ó- Sub °j°é()
- Dim Rng As Range, M As Variant, E
- Set Rng = Sheets("SHEET3").Range("A:A")
- Sheets("SHEET2").UsedRange.Offset(1).Clear
- For Each E In Sheets("SHEET1").Range("A:A").SpecialCells(xlCellTypeConstants) '¯S®íÀx¦s®æ(¦r¦ê),±Æ°£ªÅ¥ÕÀx¦s®æ.
- If E.Row > 1 Then '±Æ°£ªíÀY
- M = Application.Match(E, Rng, 0) '·j´MDevice¦bRngªº¦ì¸m=¦C¸¹
- If IsNumeric(M) Then '¬O¼Æ¦r:¦³§ä¨ìDevice¦bRngªº¦ì¸m
- With Sheets("SHEET2").Cells(Sheets("SHEET2").Rows.Count, "A").End(xlUp).Offset(1) 'SHEET2 AÄæ ¼g¤Wªº¦ì¸m
- 'SHEET2 AÄæ ¥Ñ¤U©¹¤W¨ì¦³¸ê®ÆÀx¦s®æªº¤U¤@¦C
- .Range("A1") = Rng.Cells(M, 2) 'Package ¦b Device ªº¥kÄæ
- .Range("B1") = E 'Device
- .Range("D1") = E.Range("C1") 'Datecode
- .Range("E1") = E.Range("D1") 'Wafer ID
- '*************************
- 'µ¥Ô§Aªº±ø¥ó»¡©ú«á¼gµ{¦¡½X
- '*************************
- End With
- End If
- End If
- Next
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 6
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 8
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-10-15
- ³Ì«áµn¿ý
- 2015-9-23
|
·PÁ«e½úÄ@·N¥X¤â¬Û±Ï¡A¸U¤À·PÁ¡A§Ú¦A¸É¤W»Ý¨D©M±ø¥óªº»¡©ú¡A¦A½Ð±z¹L¥Ø¡I
³]p»¡©ú.rar (13.72 KB)
|
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 3# tsou516 - Sub °j°é()
- Dim Rng(1 To 6) As Range, E As Variant, M As Variant, M1 As Variant, i As Integer, ii As Integer
- With Sheets("sheet1") '«È¤á¸ê®Æ
- If .[COUNTA(A:A)] <> .UsedRange.Rows.Count Then .Range("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete '§R°£ªÅ¥Õ¦C
- For E = 0 To 14
- .[E1].Offset(, E).Name = .[E1].Offset(, E) & "È" '©w¸q¦WºÙ: B01 B02 B03 B04.....
- Next
- End With
- Sheets("Sheet2").UsedRange.Offset(1).Clear '²M°£²Ä¤G¦C(§t)«áªº¸ê®Æ
- Set Rng(1) = Sheets("Sheet1").UsedRange.Columns(1) '«È¤á¸ê®Æ
- Set Rng(2) = Sheets("Sheet2").Range("A:A") 'n¼g¤Jªº½d³ò
- Set Rng(3) = Sheets("Sheet3").Range("A:A") 'Device
- Set Rng(4) = Sheets("Sheet4").Range("A:A") 'Package
- Set Rng(5) = Sheets("Sheet4").Range("B1:N1") 'Test out Q'ty,RG/SWT ....
- For Each E In Rng(1).Cells '«È¤á¸ê®Æ
- If E.Row > 1 Then '±Æ°£ªíÀY
- M = Application.Match(E, Rng(3), 0) '·j´MSheet1ªºDevice¦bSheet3ªº¦C¦ì
- If IsNumeric(M) Then M1 = Application.Match(Rng(3).Cells(M, 2), Rng(4), 0)
- 'M1: ¶Ç¦^Sheet3ªºPackage¦bSheet4ªº¦C¦ì
- If IsNumeric(M) And IsNumeric(M1) Then
- i = Application.CountA(Rng(2)) + 1 'pºâ¦³¤å¦rÀx¦s®æ¼Æ
- With Sheets("SHEET2").Cells(i, "A") 'SHEET2 AÄæ ¼g¤Wªº¦ì¸m
- .Range("A1") = Rng(4).Cells(M1, 1) 'Sheet4¹ïÀ³ªºPackage
- .Range("B1") = E 'Device
- .Range("D1") = E.Range("C1") 'Datecode
- .Range("E1") = E.Range("D1") 'Wafer ID
- For Each C In Rng(5).Offset(M1 - 1) '¤ñ¹ï¹ïÀ³ªº'B01 B02 B03 B04.....
- If C <> "" Then
- M = Application.Match(C.Parent.Cells(1, C.Column), Rng(2).Cells(1).EntireRow, 0) '·j´MSheets("Sheet2")ªºÄæ¦ì
- 'M=B01 B02 B03 B04.....¤W¤è²Ä¤@¦C¼ÐÀY¦bSheet2²Ä¤@¦CªºÄæ¦ì¼Æ
- For ii = 0 To UBound(Split(C, "+")) '¦r¦ê¥H"+"¤À³Î¦¨°}¦C
- '.Parent.Cells(i, M) = .Parent.Cells(i, M) + Range(Split(C, "+")(ii)).Offset(E.Row - 1) 'SHEET4ªº®æ¦¡ B01È B02È B03È B04È.....
- .Parent.Cells(i, M) = .Parent.Cells(i, M) + Range(Split(C, "+")(ii) & "È").Offset(E.Row - 1) 'SHEET4ªº®æ¦¡ B01 B02 B03 B04.....
- '.Parent -> Sheets("SHEET2")
- 'Range(Split(C, "+")(ii) & "È"): ¤u§@ªí¤W©Ò©w¸q¦WºÙªº¦ì¸m
- Next
- End If
- Next
- End With
- Else
- If Rng(6) Is Nothing Then
- Set Rng(6) = E.EntireRow '¤ñ¹ï¤£¨ìªºDevice,Package
- Else
- Set Rng(6) = Union(Rng(6), E.EntireRow) 'Union ¤èªk ¶Ç¦^¨âөΦhÓ½d³òªº¦X¨Ö½d³ò¡C
- End If
- End If
- End If
- Next
- If Not Rng(6) Is Nothing Then Rng(6).Delete
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 6
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 8
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-10-15
- ³Ì«áµn¿ý
- 2015-9-23
|
¦^´_ 4# GBKEE
«D±`·PÁÂGBKEEª©¤jªºÀ°¦£¡AÅý§Úªº¤u§@¯à¼È®É«O¦í¡AÁÂÁ¡I |
|
|
|
|
|
|