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

[µo°Ý] ²Î­p¦U¶g¥X³f¼Æ¶q¤Î¥X³f¤Ñ¼Æ

[µo°Ý] ²Î­p¦U¶g¥X³f¼Æ¶q¤Î¥X³f¤Ñ¼Æ

¦U¦ì¥ý¶i±z¦n¡I

½Ð±Ð²Î­p¦U¶g¥X³f¼Æ¶q¤Î¥X³f¤Ñ¼Æ
ÁöµM¥i¥H¹B¥Î SUM »P CountIF §¹¦¨
¦ý¥Ñ©ó¦aÂI¤Î¶g¦¸¸ê®Æ¦h
Àµ½Ð«ü¾É¦p¦ó¨Ï¥Î¢ä¢Ð¢Ï¨Ó§¹¦¨»Ý¨D
ÁÂÁÂ

BB.rar (3.33 KB)
100 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

¦^´_ 1# b9208
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng As Range, xRow As Integer, xi As Integer
  4.     Set Rng = Sheets("¦aÂI").[A4]
  5.     With Sheets("²Î­p")
  6.         .Range("a4", .Range("q4").End(xlDown)).Clear
  7.         xRow = 4
  8.         Do While Rng.MergeCells
  9.             .Cells(xRow, "A") = Rng
  10.             .Cells(xRow, "J") = Rng
  11.              .Cells(xRow, "B") = Rng.Cells(1, 2).Text
  12.              .Cells(xRow, "k") = Rng.Cells(1, 2).Text
  13.              .Cells(xRow, "C") = Rng.Cells(7, 2).Text
  14.              .Cells(xRow, "L") = Rng.Cells(7, 2).Text
  15.              For xi = 4 To 8
  16.              With Rng.Offset(, xi - 1).Resize(7)
  17.                 Sheets("²Î­p").Cells(xRow, xi) = Application.Sum(.Value)
  18.                 Sheets("²Î­p").Cells(xRow, xi + 9) = Application.CountIf(.Cells, ">0")
  19.                 End With
  20.              Next
  21.              xRow = xRow + 1
  22.             Set Rng = Rng.End(xlDown)
  23.         Loop
  24.         .Range("a4:" & .Range("H4").End(xlDown).Address & ", J4:" & Range("q4").End(xlDown).Address).Borders.Value = 1
  25.     End With
  26. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE
½Ð±Ð GBKEE ª©¤j¡G
  1. Sheets("²Î­p").Cells(xRow, xi) = Application.Sum(.Value)
  2. Sheets("²Î­p").Cells(xRow, xi + 9) = Application.CountIf(.Cells, ">0")
½Æ»s¥N½X
.Sum(.Value) »P .CountIf(.Cells, ">0") ¨äµ²ªG¬O¤@­Pªº¡A
¤@­Ó¬O¦X­p¡B¤@­Ó¬O­pºâ­È¡A¦b¹ê°È³B²z¤W¦³©Ò°Ï§O¶Ü¡H

TOP

¦^´_ 2# GBKEE

ÁÂÁª©¥D«ü¾É
°õ¦æ¥i¥H¡A¤]²Å¦X»Ý¨D¡C
§V¤O¾Ç²ß¤F¸Ñ
¦A¦¸ÁÂÁÂ
100 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 3# c_c_lai

SUM¬O­pºâÀx¦s®æ¤º¼Æ­È¦X­p
COUNTIF¬O²Î­pÀx¦s®æ¤º¼Æ­È>0ªºÀx¦s®æ¼Æ¶q
¤GªÌ¤£¦P
100 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 5# b9208
·PÁ§Aªº»¡©ú¡A²×©óÅé·|¤F CountIf ªº§t·N¡A
ÁÂÁ§A¡I

TOP

        ÀR«ä¦Û¦b : ÁÀ¨¥¹³¤@¦·²±¶}ªºÂAªá¡A¥~ªí¬üÄR¡A¥Í©Rµu¼È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD