ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð±Ð¬d¸ß°ÝÃD~~~¨D¸Ñ´b!!

½Ð±Ð¬d¸ß°ÝÃD~~~¨D¸Ñ´b!!

¦U¦ì°ª¤â¤Îª©¥D¤j¤j ¦n
  
                ¥Ø«e¬Ovba¤p¹à¹à,¦ý²{¦æ»Ý¨D,·Q¸ò¦U¦ì°ª¤â¤j¤j¤Îª©¥D ¹q¶O¤ÀÅu¨t²Î.zip (51.61 KB) ½Ð±Ð~~¨D¸Ñ´b~~ÁÂÁÂ
yvonne

¥»©«³Ì«á¥Ñ GBKEE ©ó 2018-1-15 08:51 ½s¿è

¦^´_ 1# afu9240
¦³©µ¦ùªº°ÝÃD¥i¦b³o¥DÃDÄ~Äòªºµo°Ý(¸`¬Ù½×¾Â¸ê·½)




UserForm1 ½Ð­×§ï¦p¤W¹Ï

UserForm1 ¹q¶O¬d¸ßªºµ{¦¡½X
  1. Option Explicit
  2. Dim ComboBox¤¸¯À(), Sh As Worksheet
  3. Private Sub UserForm_Initialize()
  4.     MultiPage1.Value = 0
  5. End Sub
  6. Private Sub ComboBox4_Change() '¨Ï¥Î³æ¦ì
  7.     ¹q¶O¬d¸ß·Ç«h
  8. End Sub
  9. Private Sub ComboBox6_Change() '­p¶O¦a§}
  10.     ¹q¶O¬d¸ß·Ç«h
  11. End Sub

  12. Private Sub ComboBox7_Change()  '­p¶O¶g´Á
  13.     ¹q¶O¬d¸ß·Ç«h
  14. End Sub
  15. Private Sub MultiPage1_Change()
  16.     If MultiPage1.Value = 2 Then ¹q¶O¬d¸ßComboBox
  17. End Sub
  18. Private Sub ¹q¶O¬d¸ßComboBox()
  19.     Dim i As Integer, xRng As Range
  20.     ComboBox¤¸¯À = Array(ComboBox4, ComboBox7, ComboBox6) '*** ±±¨î¶µ¸m©ó °}¦C¤¤**
  21.     Set Sh = Sheets("¹q¶O")
  22.     With Sh
  23.         Set xRng = .Cells(1, Columns.Count)  '¤u§@ªí³Ì¥kÃ䪺Àx¦s®æ
  24.         For i = 0 To UBound(ComboBox¤¸¯À)
  25.             xRng.EntireColumn.Clear         '¾ãÄæ²M°£
  26.             .Columns(i + 1).AdvancedFilter xlFilterCopy, , .Cells(1, Columns.Count), True
  27.             '**¶i¶¥¿z¿ï xlFilterCopy, **(ªÅ¥Õ¬°¤£«ü©w°Ñ¼Æ­È)** , .Cells(1, Columns.Count), True
  28.             xRng.Cells(Rows.Count).End(xlUp).Offset(1) = "¬d¬Ý¥þ³¡"
  29.             With ComboBox¤¸¯À(i)
  30.                 .List = Range(xRng.Cells(2), xRng.Cells(Rows.Count).End(xlUp)).Value
  31.                 '** List: ComboBox ©Î ListBox ²M³æªº¨Ó·½,¥i«ü¤u§@ªíÀx¦s®æ½d³òªº­È
  32.                 .Value = .List(.ListCount - 1)  '**List³Ì«á¤@­Ó¤¸¯À
  33.             End With
  34.         Next
  35.         xRng.EntireColumn.Clear
  36.     End With
  37. End Sub
  38. Private Sub ¹q¶O¬d¸ß·Ç«h()
  39.     Dim i  As Integer, Msg As Boolean, Rng As Range, Ar()
  40.     Sh.Cells(1, Columns.Count) = ""
  41.     Set Rng = Sh.Cells(1, Columns.Count)
  42.     Ar = Sh.Range("A1:C1").Value '**=Array("¨Ï¥Î³æ¦ì","­p¶O¶g´Á","­p¶O¦a§}")
  43.     Sheets("¤u§@ªí3").Range("a1").CurrentRegion.Clear
  44.     '**Range.CurrentRegion  ¶Ç¦^ Range ª«¥ó¡A¸Óª«¥ó¥Nªí¥Ø«eªº°Ï°ì¡C¥Ø«e°Ï°ì¬O«ü¥H¥ô·NªÅ¥Õ¦C¤ÎªÅ¥ÕÄ檺²Õ¦X¬°Ãä¬Éªº½d³ò¡C
  45.     For i = 0 To UBound(ComboBox¤¸¯À)
  46.         If ComboBox¤¸¯À(i).ListIndex > -1 Then
  47.             If Rng.Text <> "" Then Set Rng = Rng.Cells(, 0)
  48.             Rng = Ar(1, i + 1)
  49.             Rng.Cells(2) = ComboBox¤¸¯À(i)
  50.             If ComboBox¤¸¯À(i).ListCount - 1 = ComboBox¤¸¯À(i).ListIndex Then Rng.Cells(2) = "<>"
  51.             '¬d¬Ý¥þ³¡ ®É ·Ç«h±ø¥ó¬° <>
  52.             'ListCount => 1 ¨ì ¤¸¯ÀªºÁ`¼Æ ,ListIndex =>0 ¤¸¯ÀªºÁ`¼Æ-1
  53.         End If
  54.     Next
  55.     If Rng <> "" Then
  56.         Set Rng = Range(Rng, Rng.End(xlToRight)).Resize(2)
  57.         Sh.Range("a1").CurrentRegion.AdvancedFilter xlFilterCopy, Rng, Sheets("¤u§@ªí3").Range("a1")
  58.         
  59.     End If
  60.     Set Rng = Sheets("¤u§@ªí3").Range("a1").CurrentRegion
  61.     'RowSource ÄÝ©Ê  «ü©w ComboBox ©Î ListBox ²M³æªº¨Ó·½¡C
  62.      With ListBox1
  63.         .RowSource = ""
  64.         .Clear
  65.         .TextAlign = fmTextAlignCenter
  66.         .RowSource = Rng.Address(, , , 1, 1)
  67.         If Rng.Rows.Count > 1 Then
  68.             .ColumnCount = Sh.Range("a1").CurrentRegion.Columns.Count  '«ü©wÅã¥ÜªºÄæ¦ì¼Æ
  69.             .RowSource = Sheets("¤u§@ªí3").Range("a1").CurrentRegion.Address(, , , 1, 1)
  70.             .Font.Size = 12
  71.         Else
  72.             .RowSource = ""
  73.             .Font.Size = 48
  74.             .ColumnCount = 1
  75.             .AddItem "¬dµL¸ê®Æ"
  76.         End If
  77.         End With
  78. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE

·PÁÂG¯«¦^´_!!
   
  §Ú»Ý­n®É¶¡®ø¤Æ¤@¤U,¦³°ÝÃD¦A¸ò G¯«¤j¤j½Ð¯q!!!!¤Ó±j¤F
½×¾Â¯uªº­n«ùÄòÃÙ§U
yvonne

TOP

¦^´_ 3# afu9240


    G¤j±z¦n

  ½Ð±Ð¤@¤U,ªþ¥ó³o­Ó±Æ§Ç¥\¯à, ¬°¦ó¥[¤WÄæ¦ì¦WºÙ 123.JPG

¦Û°Ê±Æ§Ç¥\¯à´NµLªk°õ¦æ ¥i¥H¨ó§U¶Ü???    ¯à.zip (16.59 KB)
yvonne

TOP

¦^´_ 4# afu9240
¸Õ¸Õ¬Ý
  1. Sub tt()
  2.     Dim AR()
  3.     AR = Sheets("¤u§@ªí1").Range("A1").CurrentRegion.Value
  4.     With Sheets("¤u§@ªí2").Range("A1")
  5.         .CurrentRegion.Clear
  6.         .Resize(UBound(AR), UBound(AR, 2)) = AR
  7.          With .CurrentRegion
  8.             .Sort Key1:=.Range("A1"), Order1:=xlAscending, _
  9.             Key2:=.Range("B1"), Order2:=xlAscending, _
  10.             Key3:=Range("C1"), Order3:=xlAscending, Header:=xlNo
  11.            'Header:=xlNo  ²Ä¤@¦C¤£¬O¼ÐÃD
  12.            'Header:=xlYes ²Ä¤@¦C¥]§t¼ÐÃD
  13.          End With
  14.     End With
  15. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 5# GBKEE


    ·PÁÂG¤j,·PÁÂ
yvonne

TOP

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD