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

[µo°Ý] ¦p¦ó¨Ï¥Îvba­pºâ¦U¦C©³¦â¥[Á`

[µo°Ý] ¦p¦ó¨Ï¥Îvba­pºâ¦U¦C©³¦â¥[Á`

¥»©«³Ì«á¥Ñ sax868 ©ó 2013-9-24 21:32 ½s¿è

¦¨ÁZ³æ.zip (15.23 KB)
  1. Sub YY()


  2. [J3] = 0

  3. For Each A In [A:G]

  4.   If A.Interior.ColorIndex = 6 Then   'If A.Font.ColorIndex = 6 Then


  5.      [J3] = [J3] + 1

  6.   End If

  7. Next

  8. End Sub
½Æ»s¥N½X
¦U¦ì¤j¤j±ß¦w!

½Ð°Ý­n¦p¦ó½s¼gvba¨Ï­pºâ¦U¦C©³¦â¥[Á`©O? §Úªº¤T¸}¿ß¥\¤Ò¥u·|¥þ³¡¥[¦Ó¥B¶]«ÜºC(§Ö·í¤F)¦ý¦pªG­n¨C¤@¦C¥u­n¦³¥X²{¶À©³¦â¤£½×¦¸¼Æ§Y¬°1,§Ú´N¤£·|¤F...¯à§_·Ð½Ð¦n¤ßµ½¨}ªº¤j¤j­Ì¸Ñ±Ï®z¤k¤l?
»Ý¨D¸Ô¨£¦p¤U:
1.­pºâCÄæ¨ìGÄæ¥u­n¬O¥X²{¶À¦â©³¦â«h¦bIÄæÅã¥Ü"1"
2.IÄ檺­pºâª½¨ìBÄæ¦ì¬°ªÅ¥Õ¬°¤î
3.¦bJ3 Åã¥ÜIÄ檺©Ò¦³­p¼Æ¥[Á` (µª®×»Ý­n¬O­p9, ¤£¬O14)


·P¿E¤£ºÉ~

®z¤k¤l¯d:P

Æ[¼¯¤Î½m²ß
Sub Ex5()
    Range([G3], [G3].End(xlDown)).Offset(, 2).Resize(, 2).ClearContents
    For Each E In Range([C3], [G3].End(xlDown))
        If E.Interior.ColorIndex = 6 Then Cells(E.Row, "I") = 1
    Next
    [J3] = Application.Sum([I:I])
End Sub
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

´_¬¡¤F¡B´_¬¡¤F!! ·PÁ¶W¯Åª©¥D­Ìªº¹©¤O¬Û§U!! ¦n¦n¥Î³á~~~
¯¬¦U¦ì¤j¤j­Ì¦³­Ó¬ü¦nªº¤@¤Ñ! ^_^~

®z¤k¤l¯d

TOP

¦^´_  c_c_lai
¼Ó¥D¦³»¡: 3.¦bJ3 Åã¥ÜIÄ檺©Ò¦³­p¼Æ¥[Á` (µª®×»Ý­n¬O­p9, ¤£¬O14)
GBKEE µoªí©ó 2013-9-25 07:49

¯u¤£¦n·N«ä¡A¬O§Ú¦Ñ²´©üªá¤F¡I
ÁÂÁ«ü±Ð¡I

TOP

¦^´_ 4# c_c_lai
¼Ó¥D¦³»¡: 3.¦bJ3 Åã¥ÜIÄ檺©Ò¦³­p¼Æ¥[Á` (µª®×»Ý­n¬O­p9, ¤£¬O14)
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 1# sax868
®M¥Î  Hsieh ª©¤jªºµ{¦¡½X¡Aµyµy­×§ï¦p¤U¡G
  1. Sub ex()
  2.     Dim n As Long, cnt As Long
  3.    
  4.     r = 3
  5.     Do Until Cells(r, 3) = ""
  6.         For Each a In Cells(r, 3).Resize(, 5)
  7.             If a.Interior.ColorIndex = 6 Then Cells(r, "I") = 1: cnt = cnt + 1
  8.         Next
  9.         r = r + 1
  10.     Loop
  11.     [J3] = cnt
  12. End Sub
½Æ»s¥N½X
µª®×¡G [J3] = 14

TOP

¦^´_ 1# sax868
  1. FindFormat ÄÝ©Ê  ³]©w©Î¶Ç¦^­n´M§ä¤§Àx¦s®æ®æ¦¡Ãþ«¬ªº·j´M·Ç«h¡C
½Æ»s¥N½X
  1. Sub Ex()
  2.     Dim E As Range, Cnt As Integer
  3.     Application.FindFormat.Clear
  4.     Application.FindFormat.Interior.ColorIndex = 6
  5.     With ActiveSheet
  6.         For Each E In .Range("C3", .Range("G3").End(xlDown)).Rows
  7.             If Not E.Find("", SearchFormat:=True) Is Nothing Then
  8.                 .Cells(E.Row, "I") = 1
  9.                 Cnt = Cnt + 1
  10.             End If
  11.         Next
  12.         .Range("J3") = Cnt
  13.     End With
  14.     Application.FindFormat.Clear
  15. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 1# sax868
  1. Sub ex()
  2. r = 3
  3. Do Until Cells(r, 3) = ""
  4.    For Each a In Cells(r, 3).Resize(, 5)
  5.       If a.Interior.ColorIndex = 6 Then Cells(r, "I") = 1: cnt = cnt + 1: Exit For
  6.    Next
  7.    r = r + 1
  8. Loop
  9. [J3] = cnt
  10. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD