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

[µo°Ý] Dictionary¤§¤U,¨â­ÓExcelÄæ¦ìÁp¦X §@¬°§P§O±ø¥ó

  1. Sub Ex()
  2.     Dim D As Object, R As Range
  3.     Set D = CreateObject("Scripting.Dictionary")
  4.     With Sheet1
  5.         For Each R In .Range(.Cells(2, 3), .Cells(65536, 4).End(xlUp)).Rows
  6.             D(R.Cells(1) & R.Cells(2)) = R
  7.         Next
  8.     End With
  9.     If D.Count = 0 Then Exit Sub
  10.     With ListBox1
  11.         .ColumnCount = 2
  12.         .List = Application.Transpose(Application.Transpose(D.items))
  13.     End With
  14. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD