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

[µo°Ý] ListBox»P±Æ§Ç¥[Á`°ÝÃD

¸ê®Æ¬ÛÃö¥[Á`°ÝÃD

¦p¹Ï¥Ü¦³A-EÄæ

§PÂ_A.B.C.DÄæ¦pªG¬°¤@­P

´N¬°¤@²Õ¸ê®Æ

¦A¥h°µEÄ檺¥[Á`  ¦pªþ¹Ï   

­ì¥»·Q¥Î¿ý»s¥¨¶°

¦ý¬O°²¦p¸ê®Æ¤@¦h

©È·|¦³«Ü¦h¦a¤èlose±¼

ÁٽаݦU¦ì¦æ®a¸Ó¦p¦óµÛ¤â³o­Ó°ÝÃD><"
¥[Á`1.jpg ¥[Á`2.jpg
¥[Á`.zip (16.9 KB)

TOP

Sub TEST()
Dim Arr, Brr, xD, Dn&, T$, N&, i&, j%
Arr = Range([A1], Cells(Rows.Count, 1).End(xlUp)(1, 5))
Set xD = CreateObject("Scripting.Dictionary")
ReDim Brr(1 To UBound(Arr), 1 To 5)
For i = 2 To UBound(Arr)
¡@¡@For j = 1 To 4: T = T & "/" & Arr(i, j): Next
¡@¡@¡@¡@Dn = xD(T)
¡@¡@¡@¡@If Dn = 0 Then
¡@¡@¡@¡@¡@N = N + 1: Dn = N: xD(T) = N
¡@¡@¡@¡@¡@For j = 1 To 4: Brr(Dn, j) = Arr(i, j): Next
¡@¡@¡@¡@End If
¡@¡@¡@¡@Brr(Dn, 5) = Brr(Dn, 5) + Val(Arr(i, 5)): T = ""
Next i
If N > 0 Then [H2].Resize(N, 5) = Brr
End Sub

Xl0000035.rar (16.73 KB)
¡@

TOP

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


    ¦^ª©¤j
    ¹ï­C³o¬O§Ú·Q­nªºµ²ªG
    ¥i¥H¦A³Â·Ðª©¤j¸Ñ»¡¤@¤Uµ{¦¡½Xªº³¡¤À¶Ü
    §Ú·QÅý¦Û¤v¥h¹Á¸Õ°µÅÜ°Ê

TOP

¦^´_ 1# starbox520
¼Ï¯Ã¤ÀªRªí²Ó³¡½Õ¾ã«á¤]¯à¹F¦¨
  1. Sub test()
  2.     Dim rngData As Range: Set rngData = Sheets("¤u§@ªí1").Range("A1:E33")
  3.     Dim arKeyFields: arKeyFields = Array("CR", "LN", "PG", "BE")
  4.     Dim sumField: sumField = "QQ"

  5.     Dim pvt As PivotTable, i, x
  6.     With Sheets.Add
  7.         Set pvt = ActiveWorkbook.PivotCaches.Create( _
  8.                 SourceType:=xlDatabase, _
  9.                 SourceData:=rngData, _
  10.                 Version:=xlPivotTableVersion14 _
  11.             ).CreatePivotTable(TableDestination:=.[A1])
  12.     End With
  13.     With pvt
  14.         .InGridDropZones = False
  15.         .ShowDrillIndicators = False
  16.         .DisplayFieldCaptions = True
  17.         .RowGrand = False
  18.         .ColumnGrand = False
  19.         .RowAxisLayout xlTabularRow
  20.         i = 1
  21.         For Each x In arKeyFields
  22.             .PivotFields(x).Orientation = xlRowField
  23.             .PivotFields(x).RepeatLabels = True
  24.             .PivotFields(x).Subtotals(1) = False
  25.             .PivotFields(x).Position = i
  26.         Next
  27.         .AddDataField .PivotFields(sumField), "¥[Á` - " & sumField, xlSum
  28.     End With
  29. End Sub
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

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

¤£¦n·N«ä·Q¦A­×¥¿¤@¤U

¦pªG¸ê®Æ«¬ºA§ï¦¨¤u§@ªí2

¤@¼Ë·Q¶]¥X¤u§@ªí1ªº¼Ë¤l©O

3.png [attach]

Xl0000040.rar (27.6 KB)

TOP

¦^´_ 4# stillfish00


    ¦^¤j¤j¦]¬°§Ú¨S¥Î¹L¼Ï¯Ã¤ÀªRªí
    ­è­è¸Õ¤F¦n´X¦^³£§Ë¤£¥X¨Ó
    ¦pªG¥Î¦¹¥\¯à
    ¸ê®Æ«¬ºA§ï¦¨ªþ¹Ï³o¼Ë
    ¤@¼Ë¯à°÷¶]¥X§Ú·Q­nªº¸ê®Æ¶Ü
    3.png Xl0000040.rar (27.6 KB)

TOP

¦^´_ 6# starbox520
4# º|¤F i=i+1

§A¦A§ï²Ä¤@¦æªº¸ê®Æ½d³ò´N¦n¤F
Set rngData = Sheets("¤u§@ªí2").Range("A1:G33")
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 7# stillfish00


    ¦^S¤j
    ¤è«K©ñÀÉ®×µ¹§Ú¬Ý¶Ü
    §Ú¥[¤W¥h«á¤@ª½¥X²{¿ù»~><"

TOP

¦^´_ 5# starbox520


Xl0000160_v1.rar (21.03 KB)

TOP

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


    ¦^¤j¤j
   ¦³¨S¦³¿ìªk¦b«ö§¹¶s«á(C,E)Äæ³£¤£­n©O
    ¥u¶]¥X¹³³o¼Ë´N¦n
16100700282e1bc39c43ab0122.png

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD