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

½Ð°Ý§Ú¦p¦ó±N®w¦sªº¬¡­¶ªº¸ê®Æ,±N¥¦Àx¦s¨ì¦U¬¡­¶Ã¯?

¦^´_ 4# flask
¸ê®ÆÀ³¿í¦u¸ê®Æ®w«Ø¥ß³W«h­n°µ¤ÀªR´N¤ñ¸û¤è«K

¥H§A¥Ø«eªº¸ê®Æ­n¤À­¶À˵øµ{¦¡½X¦p¤U
  1. Sub ex()
  2. Dim a As Range
  3. Set dic = CreateObject("Scripting.Dictionary")
  4. Set d = CreateObject("Scripting.Dictionary")
  5. With Sheets("®w¦s")
  6. i = 1
  7. Do Until .Cells(1, i) = ""
  8.   myday = .Cells(1, i).Value
  9.      For Each a In .Range(.Cells(2, i), .Cells(.Rows.Count, i).End(xlUp))
  10.      If IsEmpty(d(Val(a))) Then d(Val(a)) = a.Offset(, 1).Value
  11.         ar = Array(a.Offset(, 3), a.Offset(, 4))
  12.         If IsEmpty(dic(a & d(Val(a)))) Then
  13.            dic(a & d(Val(a))) = ar
  14.            Else
  15.            dic(a & d(Val(a))) = Array(dic(a & d(Val(a)))(0) + ar(0), dic(a & d(Val(a)))(1) + ar(1))
  16.         End If
  17.      Next
  18.      For Each ky In d.items
  19.         With Sheets(ky)
  20.         s = .Cells(2, .Columns.Count).End(xlToLeft).Column + 1
  21.         .Cells(1, s) = myday: .Cells(2, s) = "¶R": .Cells(2, s + 1) = "½æ"
  22.            For Each a In .Range(.[A3], .Cells(.Rows.Count, 1).End(xlUp))
  23.                .Cells(a.Row, s).Resize(, 2) = dic(a & ky)
  24.            Next
  25.         End With
  26.      Next
  27.      dic.RemoveAll: d.RemoveAll
  28.      i = i + 5
  29.   Loop
  30. End With
  31. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

.UsedRange.Columns.AutoFit
        .Range(.Cells(2, s), .Cells(L, s)).FormatConditions.Add Type:=xlCellValue, Operator:=xlGreaterEqual _
        , Formula1:="10000"
         .Range(.Cells(2, s), .Cells(L, s)).FormatConditions(1).Font.ColorIndex = 3
        .Range(.Cells(2, s + 1), .Cells(L, s + 1)).FormatConditions.Add Type:=xlCellValue, Operator:=xlGreaterEqual _
        , Formula1:="10000"
       .Range(.Cells(2, s + 1), .Cells(L, s + 1)).FormatConditions(1).Font.ColorIndex = 5
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD