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

[µo°Ý] ¦³±ø¥óªº²Î­p

ÁÂÁ¦U¦ì¤j¤jªº«ü¾É,²×©ó§¹µ½¤F

TOP

D(Rng.Offset(, 1).Value) = D(Rng.Offset(, 1).Value) + 1

¨S·Q¨ìÁÙ¯à³o¼Ë¥Î
¤S¾Ç¨ì¤F¡A·PÁÂ

TOP

gbkeeª©¥D¸ÑÄÀªº¦n²M·¡
¤S¾Ç·|¤F·sÆ[©À

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-3-31 16:23 ½s¿è

¦^´_ 24# gctsai


    ÁÂÁ½׾Â,ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨ÒÀÉ
«á¾ÇÂǦ¹©«¬ã¨s¸ê®Æªí±Æ§Ç«á¤~±a¤J°}¦C,¸ê®Æªí´_­ì,±µµÛ¤~¶i¦æ²Î­p,
¾Ç²ß¨ì«Ü¦hª¾ÃÑ,¾Ç²ß¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð

¨Ó·½ªí:


²Î­pªí:µ²ªG


Option Explicit
Sub «Å§i()
Dim Brr, Crr, Y, N&, C&, R&, i&, j&, T$, T2$, T3$, TT$
Dim Sh1 As Worksheet, Sh2 As Worksheet
Set Y = CreateObject("Scripting.Dictionary")
Set Sh1 = Sheets("¨Ó·½"): Set Sh2 = Sheets("²Î­p")
C = Sh1.UsedRange.Columns.Count: R = Sh1.UsedRange.Rows.Count
With Range(Sh1.[A1], Sh1.Cells(R, C + 1))
   With .Columns(C + 1): .Value = "=ROW(A1)": .Value = .Value: End With
   .Sort KEY1:=.Item(3), Order1:=1, Key2:=.Item(2), Order2:=1, Header:=1
   Brr = .Value
   .Sort KEY1:=.Item(C + 1), Order1:=1, Header:=1: .Columns(C + 1).Delete
End With
For i = 2 To UBound(Brr)
   T = Brr(i, 3): If Y(T) = "" Then Y(T) = Y.Count: Y(T & "|Àx¦ì¼Æ") = ""
Next
Sh2.UsedRange.Delete
With Sh2.[A1].Resize(1, Y.Count)
   .Value = Y.keys: .Replace "*|", "", Lookat:=xlPart
End With
ReDim Crr(1 To R, 1 To Y.Count)
For i = 2 To UBound(Brr)
   T2 = Brr(i, 2): T3 = Brr(i, 3): TT = T3 & "|" & T2
   If Y(TT) = "" Then
      Y(T3 & "/r") = Y(T3 & "/r") + 1
      Crr(Y(T3 & "/r"), Y(T3)) = T2
      Crr(Y(T3 & "/r"), Y(T3) + 1) = 1
      Y(TT) = 1
      Else
         N = Y(T3 & "/r")
         Crr(N, Y(T3) + 1) = Crr(N, Y(T3) + 1) + 1
   End If
Next
With Sh2.[A2].Resize(UBound(Crr), UBound(Crr, 2))
   .Value = Crr: .EntireColumn.AutoFit
End With
Set Y = Nothing: Erase Brr, Crr: Set Sh1 = Nothing: Set Sh2 = Nothing
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ºÉ¦h¤Ö¥»¥÷¡A´N±o¦h¤Ö¥»¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD