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

[µo°Ý] ·Q½Ð°Ý¨â¦C¨ä¤¤¦³¶Ã¼ÆªÅ¥Õ®æ°ÝÃD

[µo°Ý] ·Q½Ð°Ý¨â¦C¨ä¤¤¦³¶Ã¼ÆªÅ¥Õ®æ°ÝÃD

¦U¦ì¦n
§Ú·Q½Ð°Ý  §Ú¦³¨Ç¼Æ¦r·Q³B²z
¥Ò  ¤A  ±Æ¦C¦n
          5
5   8    8
9         9
4   5    4
          5
          3
3   5    5

¦p¤W¹Ï  ¦³¨Ç¦ì¸m¬OªÅ®æ  ¦ý¬O§Ú­n®Ú¾ÚA1 B1 A2 B2 A3 B3
¤@°_±Æ¦C¦bC¨ºÃä(ªÅ®æ¤£±Æ¦C)

³o¼ËÀ³¸Ó­n«ç»ò°µ¤ñ¸û¤è«K  §Ú¦³¶Çªþ¥ó  ¦A³Â·Ð¦U¦ì¤j¤j¤F
·PÁÂ

½d¨Ò.rar (1.61 KB)

¦^´_ 1# albertbug
  1. Sub Ex()
  2.     Dim D As Object, E As Range
  3.     Set D = CreateObject("SCRIPTING.DICTIONARY")
  4.     For Each E In Range("A2:B30")
  5.         If E <> "" Then D(E) = E.Value
  6.     Next
  7.     [D2:D65536] = ""
  8.     [D2].Resize(D.Count) = Application.Transpose(D.ITEMS)
  9. End Sub
½Æ»s¥N½X

TOP

  1. Sub Ex()
  2. Dim Ay()
  3. ar = [A1].Resize(ActiveSheet.UsedRange.Rows.Count, 2)
  4. For i = 2 To UBound(ar, 1)
  5.    For j = 1 To 2
  6.       If ar(i, j) <> "" Then
  7.          ReDim Preserve Ay(s)
  8.          Ay(s) = ar(i, j)
  9.          s = s + 1
  10.       End If
  11.    Next
  12. Next
  13. [D1:D65536] = ""
  14. [D2].Resize(s, 1) = Application.Transpose(Ay)
  15. End Sub
½Æ»s¥N½X
¦^´_ 1# albertbug
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·PÁÂGBKEE & Hsiehªº±Ð¾É·PÁÂ
¦ý¬O¥i¥H¦b°Ý­Ó«ÜÄøªº°ÝÃD
¦p¦ó°õ¦æEX()
¬O§Q¥Î·s¼Wªí³æPrivate Sub CommandButton1_Click()
¥hCall ex()¶Ü

ÁÙ¬O­n¦p¦ó°õ¦æ  XD  ·PÁ  §Æ±æ¤j¤j¦A±Ð¾É

TOP

¦^´_ 4# albertbug
  1. Private Sub CommandButton1_Click()
  2.     Dim D As Object, E As Range
  3.     Set D = CreateObject("SCRIPTING.DICTIONARY")
  4.     For Each E In Range("A2:B30")
  5.         If E <> "" Then D(E) = E.Value
  6.     Next
  7.     [D2:D65536] = ""
  8.     [D2].Resize(D.Count) = Application.Transpose(D.ITEMS)
  9. End Sub
½Æ»s¥N½X

TOP

·PÁÂGBKEE¤j¤j

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD