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

[µo°Ý] ¦p¦ó±NRaw data Âনªí

[µo°Ý] ¦p¦ó±NRaw data Âনªí

½Ð±ÐVBA ¦p¦ó±NRaw data Âনªí (¦p¹Ï)

Transpose.jpg (132.87 KB)

Transpose.jpg

Transpose.zip (7.03 KB)

¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-7-31 02:50 ½s¿è

¦^´_ 1# ABK

§Aªº¹Ï¤ù[H3]Äæ¦ìªº­È¦n¹³¿ù¤F~~~

®É¶¡±ß¤F©Ò¥H¨S¼gµù¸Ñ¡A¦³°ÝÃD¦Aµo°Ý

µ{¦¡¦p¤U¡A¸Õ¸Õ¬Ý!


Sub test0731()
Dim Arr, S$, T$, R%, Ro%
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Arr = Range([A2], [C3].End(4))
With Sheets.Add
    .[A1].Resize(UBound(Arr), 3) = Arr
    With .[A1].CurrentRegion
      .Sort key1:=.Item(1), order1:=xlAscending, _
               key2:=.Item(3), order1:=xlAscending
    End With
    Arr = .[A1].CurrentRegion: .Delete
End With
[F1].CurrentRegion.Offset(1).ClearContents
ReDim Brr(1 To 1000, 1 To 7)
For R = 1 To UBound(Arr)
  If InStr(S, "-" & Arr(R, 1) & "-") = 0 Then
    Ro = Ro + 1: T = Arr(R, 1): K = 1
    Brr(Ro, 1) = Arr(R, 1)
    Brr(Ro, 2) = Arr(R, 2)
    Brr(Ro, 5) = Arr(R, 3)
    S = S & "," & "-" & Arr(R, 1) & "-"
  Else
    If Arr(R, 1) = T And K < 3 Then
      Brr(Ro, 2 + K) = Arr(R, 2)
      Brr(Ro, 5 + K) = Arr(R, 3)
      K = K + 1
    End If
  End If
Next R
[F2].Resize(UBound(Brr), 7) = Brr
End Sub
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 2# n7822123

·PÁ ªüÀs¤j !
OK¤F!

§Úªº¹Ï¤¤H3ªº­È¬O DD-2 ¤~¹ï

TOP

Sub TEST()
Dim Arr, Brr, i&, T$, R&, C&, Mx&
[F2:L2000].ClearContents
With Range([A1], [C65536].End(xlUp))
     Brr = .Value '­ì¸ê®Æ¦s¤Jbrr
     .Sort Key1:=.Item(1), Order1:=xlAscending, _
           Key2:=.Item(3), Order2:=xlAscending, Header:=xlYes '±Æ§Ç
     Arr = .Value '±Æ§Ç«á¸ê®Æ¦s¤Jarr
     .Value = Brr 'brr¶K¦^­ì°Ï
End With
ReDim Brr(1 To UBound(Arr), 1 To 7)
For i = 2 To UBound(Arr)
    If Arr(i, 1) <> T Then 'AÄæ--»P¤W¤@®æ¤£¬Û¦P®É
       R = R + 1: C = 0: T = Arr(i, 1): Brr(R, 1) = T '¦æ¸¹r+1: Äæ¦ìcÂk¹s: T­«·s½á­È: Brr¶ñ¤JT
    End If
    C = C + 1: If C > 3 Then GoTo 101 '²Ö­pcÄæ¦ì: ¤j¤_3®É--²¤¹L
    Brr(R, C + 1) = Arr(i, 2): Brr(R, C + 4) = Arr(i, 3) '¶ñ¤J[®Æ¥ó]:¶ñ¤J[®Æ¥ó§å¦¸]
101: Next i
[F2:L2].Resize(R) = Brr
End Sub



==========================

TOP

¦^´_ 4# ­ã´£³¡ªL


Ãø±o·Ç¤j·|¤Wµù¸Ñ    

§Ú·|·s¼W¤u§@ªí¦A±Æ§Ç¨ú­Èªº­ì¦]¬O

¤£·Q°Ê¨ì¥L­ì¥»ªºÀx¦s®æ®æ¦¡~~   
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 4# ­ã´£³¡ªL


    ·PÁ­ã³ö¤j !   ¼ö¤ß¤W¤Fµù¸Ñ, «ôŪ¾Ç²ß«Ü¤è«K !

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD