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

[µo°Ý] VBA¤º§â", " Âର´«Äæ

[µo°Ý] VBA¤º§â", " Âର´«Äæ

  1. Sub test()
  2. Dim dic As Object, data, i%
  3.     Set dic = CreateObject("scripting.dictionary")
  4.     data = Range(Cells(1, 1), Cells(1, 2).End(4))
  5.     For i = 1 To UBound(data)
  6.         If Not dic.exists(data(i, 1)) Then
  7.             dic.Add data(i, 1), data(i, 2)
  8.         Else
  9.         If InStr(dic(data(i, 1)), data(i, 2)) = 0 Then
  10.             dic(data(i, 1)) = dic(data(i, 1)) & " , " & data(i, 2)
  11.         End If
  12.         End If
  13.     Next
  14.     Cells(1, 3).Resize(dic.Count, 1) = Application.Transpose(dic.keys)
  15.     Cells(1, 4).Resize(dic.Count, 1) = Application.Transpose(dic.items)
  16.     Columns(4).TextToColumns Destination:=Cells(1, 4), OtherChar:=" , "
  17.    Cells.Columns.AutoFit
  18.     Set dic = Nothing
  19. End Sub
½Æ»s¥N½X
¥H¤W¦¹¥N½X,¦p¦ó§âµ²ªG±o¨Ó¬O¥H¨C­ÓÄæ¥N´À" , "

¥H²{®É±o¥Xµ²ªG,¤Q¤À²V¶Ã
ÁÂÁÂÀ°¦£
excel~ ¾Ç¦n¥L§a

¥t¥~,½Ð°Ý¦p¦ó¥i¥H§â¥H¤WVBA ¥Î¦bmac excel ¤W?
excel~ ¾Ç¦n¥L§a

TOP

¥t¥~,½Ð°Ý¦p¦ó¥i¥H§â¥H¤WVBA ¥Î¦bmac excel ¤W?
excel~ ¾Ç¦n¥L§a

TOP

¤w¤W¸ü,,ÁÂÁÂ

sample_001-1.xls.zip (613.87 KB)

excel~ ¾Ç¦n¥L§a

TOP

¦^´_ 4# n7822123

¤w¸Õ¹L,¦ý¦n¹³¸ò§Ú·Qªº¤£¤@¼Ë.ÁÂÁÂÀ°¦£
excel~ ¾Ç¦n¥L§a

TOP

¦^´_  n7822123


    ¤W¤@½g¦³ÂI¤p¿ù¡A­×§ï¦p¤U



Sub test()
Dim dic As Object, data, i%, AA ...
n7822123 µoªí©ó 2018-9-1 00:19



    ¶W·PÁÂ~~
excel~ ¾Ç¦n¥L§a

TOP

        ÀR«ä¦Û¦b : ¥@¤W¦³¨â¥ó¨Æ¤£¯àµ¥¡G¤@¡B§µ¶¶ ¤G¡B¦æµ½¡C
ªð¦^¦Cªí ¤W¤@¥DÃD