- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¥»©«³Ì«á¥Ñ yen956 ©ó 2014-3-19 15:57 ½s¿è
¦^´_ 1# 013160
³o¬O2003ª©, §Aªº¬O2007ª©, À³¦³§ó²³æª©
¦ýÀ³¤´¥i¥Î, ¸Õ¸Õ¬Ý:
- 'Sheet1
- Option Explicit
- '¦Ò¼{¨ì¡i½s¸¹¡j¬Û·íªø(ªø¹F12¦ì¼Æ),¬G¥Î¤U©Ô¦¡¿ï³æ¿é¤J¡i½s¸¹¡j
- Private Sub ComboBox1_Change()
- Dim sh1, sh2 As Object
- Dim i, endRow, cnt As Integer
- Set sh1 = Sheets("Sheet1")
- Set sh2 = Sheets("Sheet2")
- If ComboBox1 = "" Then Exit Sub
-
- '²M°£ì¦³¸ê®Æ
- sh1.[B2].Resize(2000, 2) = ""
-
- '¨ú±o ½s¸¹ ³Ì«á¤@¦Cªº¦C¸¹
- endRow = sh2.[D2000].End(xlUp).Row
- cnt = 1
- For i = 2 To endRow
- If sh2.Cells(i, 4) = --ComboBox1 Then
- cnt = cnt + 1
- sh1.Cells(cnt, 2) = sh2.Cells(i, 1) '½Æ»s ¶¼Æ
- sh1.Cells(cnt, 3) = sh2.Cells(i, 6) '½Æ»s ¾l¼Æ
- End If
- Next
- End Sub
- '
- 'Sheet2
- Option Explicit
- '¦pªG Sheet2 ªº¡i½s¸¹¡j¦³¼W´î®É,¥iÂI¿ï Sheet2,
- '¥Î¥HIJ°Ê¥»µ{§Ç, ¶i¦æ¸ê®Æ«¾ã
- Private Sub Worksheet_Activate()
- Dim i, endRow As Integer
-
- '2007ª©¦ü¥i ±N¡i¿z¿ï¡j»P¡i±Æ§Ç¡j¤@¨Ö³B²z
- '¥i±¤§Úªº¬O 2003ª©, ¥u¯à¤À¶}³B²z
- '¥Î¡i¶i¶¥¿z¿ï¡j±N¡i½s¸¹¡j¿z¿ï¨ì ÄæI, ¨Ã¥h°£¡i«Âнs¸¹¡j
- Range("D1:D2000").AdvancedFilter Action:=xlFilterCopy, _
- CriteriaRange:=Range("D1:D2000"), _
- CopyToRange:=Range("I1"), Unique:=True
-
- endRow = [I2000].End(xlUp).Row
- '±N¿z¿ïµ²ªG, ½Æ»s¨ì ÄæJ
- [J1].Resize(2000, 1) = ""
- For i = 1 To endRow
- Cells(i, 10) = Cells(i, 9)
- Cells(i, 9) = ""
- Next
-
- '±N ÄæJ «ö¤É¾±Æ§Ç, ¨Ã±N®æ¦¡³]¬° "0000000000000"
- Range("J1:J2000").Sort Key1:=Range("J1"), _
- Order1:=xlAscending, Header:=xlYes
- Range("J1:J2000").NumberFormatLocal = "0000000000000"
-
- '«·s©w¸q ¦WºÙ "x" ªº½d³ò, ¨Ñ Sheet1 ªº ComboBox1 ¥Î
- endRow = [J2000].End(xlUp).Row
- ActiveWorkbook.Names("x").Delete
- ActiveWorkbook.Names.Add Name:="x", _
- RefersToR1C1:="=Sheet2!R2C10:R" & endRow & "C10"
- End Sub
½Æ»s¥N½X ¿é¤J½s¸¹.7z
http://www.mediafire.com/download/4bw6wen76mga98f/¿é¤J½s¸¹.7z |
|