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

VBA ¥Î¦r¨åªº¤è¦¡´£¥h¤£­«½Æ¤Î¤p¨ì¤jªº±Æ§Ç

VBA ¥Î¦r¨åªº¤è¦¡´£¥h¤£­«½Æ¤Î¤p¨ì¤jªº±Æ§Ç

¦U¦ì¤j¤j:

½Ð°Ý¦p¦ó¥Î VBA ¤¤ ¥Î¦r¨åªº¤è¦¡ ±q¤p¨ì¤jªº±Æ§Ç

2017-11-24_111846.jpg

§Ú¥u¼g¨ì¤£­«½Æ¡A±Æ§Ç´N¥d¦í¤F¡C
Sub text()
    Dim d As Object, arr, brr
    Set d = CreateObject("scripting.dictionary")
   
    arr = Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)
   
    ReDim brr(1 To UBound(arr), 1 To 1)
   
    For i = 1 To UBound(arr)
        s = arr(i, 1)
        If Not d.exists(s) Then
            d(s) = ""
            k = k + 1
            brr(k, 1) = arr(i, 1)
        End If
    Next
    Range("B:B").ClearContents
    Range("B1").Value = "µ²ªG"
    With Range("B2").Resize(k, 1)
        .NumberFormat = "@"
        .Value = brr
    End With
   
    Set d = Nothing
      
end sub

VBA¦r¨å±Æ§Ç¤è¦¡.zip (5.93 KB)

¦^´_ 1# kim223824

­Ó¤H½m²ß¡A¼Æ­È±q¤p¨ì¤j±Æ§Ç¡A·Q¨ì¨Ï¥ÎSmall¨ç¼Æ±Æ§Ç¡A¸Ô¤U¹Ï¬õ®Ø¡G
    Sort_test.gif

TOP

©ÎªÌ¥Î¿ý¨î¥¨¶°ªº¥\¯à ¤]¦æ

TOP

¦^´_ 1# kim223824
©³¤U¸Û¦p3¼Ó adrian_9832 ©Ò»¡ªº¬O¥Î¿ý»sªº¤è¦¡¨ú±o¡G
Sub test()
    Columns("A").Copy [B1]
    er = [A65536].End(3).Row
    With Range("B1:B" & er)
        .RemoveDuplicates Columns:=1, Header:=xlNo
        .Sort key1:=[B1], Order1:=1
    End With
End Sub

TOP

·PÁ¦U¦ì¤j¤j:
´£¨Ñªº¤èªk¡Aµ²ªG¤@¼Ë¡A§Ú¥»¨Ó·Q¥Î¦r¨åªº»yªk¡A¨Ó§¹¦¨³o¼Ëµ{¦¡¡C

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD