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

FormatConditions«ç»ò¨ú±o¤å¦rÃC¦âªº­È

¦^´_ 1# doom834
¤W¶ÇÀÉ®× ¬Ý¤@¤U FormatConditionsªº¤½¦¡¦p¦ó³]©w
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-10-22 17:51 ½s¿è

¦^´_ 3# doom834
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng As Range, AR(), C As Integer, R As Integer
  4.     For Each Rng In Sheets("图ªí").[b4:I11,b15:I22,b26:I33].Areas
  5.         ReDim AR(1 To Rng.Columns.Count, 1 To Rng.Rows.Count)
  6.         For R = 1 To Rng.Rows.Count
  7.             For C = 1 To Rng.Columns.Count
  8.                 AR(R, C) = 0
  9.                 If Rng.Cells(R, C).FormatConditions.Count > 0 Then
  10.                     Rng.Cells(R, C).Select
  11.                     If Application.Evaluate(Rng.Cells(R, C).FormatConditions(1).Formula1) Then AR(R, C) = Rng.Cells(R, C).Value
  12.                 End If
  13.             Next
  14.             Rng.Cells(R, C) = Application.Sum(Application.Index(AR, R))
  15.         Next
  16.         For C = 1 To Rng.Columns.Count
  17.             Rng.Cells(Rng.Rows.Count + 1, C) = Application.Sum(Application.Index(Application.Transpose(AR), C))
  18.         Next
  19.         Rng.Cells(Rng.Rows.Count + 1, Rng.Columns.Count + 1) = Application.Sum(Rng.Columns(Rng.Columns.Count + 1))
  20.     Next
  21. End Sub
½Æ»s¥N½X
®æ¦¡¤Æ±ø¥ó¤½¦¡©Ç©Çªº°Ñ·Ó¬O§_¶]±¼¤F
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 5# doom834
§AªþÀɤ¤¨S¦³Sheets("ͼ±í")³o¤u§@ªí¶·­×¥¿
  1. For Each Rng In Sheets("ͼ±í").[b4:I11,b15:I22,b26:I33].Areas
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¦Y­W¤F­W¡B­WºÉ¤Ü¨Ó¡A¨ÉºÖ¤FºÖ¡BºÖºÉ´d¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD