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

COUNTA ©Î¬Y¨Ç¨ç¼Æ¦bVBA¤W¨Ï¥ÎªººÃ°Ý

COUNTA ©Î¬Y¨Ç¨ç¼Æ¦bVBA¤W¨Ï¥ÎªººÃ°Ý

Dear ¤j¤j­Ì

      ¤p§Ì¦bVBA¼¶¼g¦³Ãö¨ç¼Æ³¡¥÷ªºµ{¦¡½X®É,³£·|¦³¤@­Ó°ÝÃD
      ´N¬O¦bSHEET1Ū¨úSHEET2ªº¸ê®Æ®É,·|Ū¤£¨ì,¨Ò¦pªþ¥ó¤¤ªºCOUNTA³o­Ó¨ç¼Æ

      ¯à§_½Ð¤j¤jÁ¿¸Ñ¤@¤U,°ÝÃD¬O¤°»ò??? ¨ä¨ç¼Æ¦bVBA¤W¼¶¼gªº°ò¥»Æ[©À¬°¦ó?? ¦nÅý¤p§Ì¥i¥H¾Ç²ß~


         ¦bVBA¤º¨Ï¥ÎCOUNTA¨ç¼Æ´ú¸Õ.rar (8.23 KB)

¦^´_ 13# asus103


    ³o¬O¤j¤j¶Kªººô§}~ ©È¦³¤H§ä¤£¨ì¨º¬q¸ÑÄÀªº¤å¦r~ ¯S¦a¶K¥X¨Ó~

1. ª`·N Match ¬O¤u§@ªí¨ç¼Æªº¦¨­û¦Ó¤£¬OVBA¤º«Ø¨ç¼Æ¡A©Ò¥H»Ý«ü©ú¤W¼hª«¥ó¡C
WorksheetFunction ªº¼Ð·Ç¼gªk¬O Application.WorksheetFunction¡C

2. ª`·N§Aªºµ{¦¡¦ì©ó¤@¯ë¼Ò²ÕÁÙ¬Oª«¥ó¼Ò²Õ¡C
¤@¯ë¼Ò²Õ¡G
¦b¤@¯ë¼Ò²Õ (´N¬O Module1¡BModule2.. ¨º¨Ç) ¸Ì¬O¥i¥H¬Ù²¤ Application ªº¡C
(¬Ù²¤ Application ´N¤£¯à¬Ù²¤ WorksheetFunction¡A·N«ä´N¬O¤£¯à¥u¼g¨ç¼Æ¦WºÙ)
ª«¥ó¼Ò²Õ¡G
¦ý¦bª«¥ó¼Ò²Õ¸Ì´N¤£¯à¬Ù²¤ Application ¤F¡A
¦]¬°ª«¥ó¼Ò²Õ¹w³]ªºª«¥ó¬O¸Óª«¥ó¥»¨­¡A
¨Ò¦p Worksheet ¼Ò²Õªº¹w³]ª«¥ó¬O Worksheet¡F
UserForm ¼Ò²Õªº¹w³]ª«¥ó´N¬O UserForm¡C¥Ñ¦¹¥iª¾¡A
­Y¦b UserForm1 ¼Ò²Õ¼g WorksheetFunction (¬Ù²¤¤F Application)¡A
VBA ·|µø¬° UserForm1.WorksheetFunction¡Aµ²ªG´N·|¥X¿ù¤F¡C
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

§Ú¤]¾Ç¨ì¤F,ÁÂÁÂ.

TOP

¦^´_ 2# Hsieh
½Ð°Ý¤@¤Uª©¥D¤j¤j
¬°¤°»ò¬O¥ÎApplication.CountA(Sheet2.[A7:A65536])
¦Ó¤£¬O¥ÎWorksheetFunction.CountA(Sheet2.[A7:A65536])
§Ú¦b»¡©ú¤¤¥u¦³¬Ý¨ì¤UªÌ
¥L­Ì(Application©MWorksheetFunction)¤§¶¡³£¥i¥H³q¥Î¶Ü?
ÁÙ¬O¦³¨ä¥¦ªº­­¨î
ASUS

TOP

­Y³æ¯Â­n§Q¥Î Excel ªº¨ç¼Æ¤]¥i¥H¥Î WorksheetFunction.CountA ªº¤è¦¡®@~~

TOP

¦^´_ 10# hugh0620
Sub Ex()
Dim W%
W=10
Sheet1.Cells(4, 2) = Application.CountA(Sheet1.Range("A" & W & ":A65536"))
End Sub

TOP

¦^´_ 9# GBKEE

   ÁÂÁ¤j¤j~ À°§Ú¸Ñ¨M (§Ú¦Û¤v¸Õ¤F¦Ñ¥b¤Ñ³£µLªk¸Ñ¨M):L
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 8# hugh0620
Sheet1.Cells(4, 2) = Application.CountA(Sheet1.[A22:A65536])                       '¤£±µ¨üÅܼÆ
Sheet1.Cells(4, 2) = Application.CountA(Sheet1.Range("A" & W & ":A65536")) '±µ¨üÅܼÆ

TOP

¦^´_ 3# GBKEE


    Dear ¤j¤j

        ¤p§Ì·Q­n¦A½Ð°Ý¤@­Ó°ÝÃD
        ­Y¬O§Ú¦b¥ÎCOUNTA¥h²Î­p®É,­Y§Úªº°Ï¶¡¬O¤£¤@©wªº®É­Ô,´N·|¦³°ÝÃD
           ¤@¯ë¥¿±`ªº¼gªk¬O
        Application.CountA(Sheet2.[E22: E65536]) [©T©T°Ï¶¡¶i¦æ²Î­p)
           ­Y§Ú¤wW¬O¤@­ÓRowªº¼Æ­È(¥ç§Y¬O¸ÓÀx¦s®æ¬O¦b²Ä´X¦C)        
        Application.CountA(Sheet2.[E&W: E65536]) [§ïÅܦ¨¥i¯B°Ê°Ï¶¡¶i¦æ²Î­p]

           ½Ð¤j¤j±Ð¾É§Ú

            COUNTA¶i¶¥°ÝÃD_20110106.rar (9.5 KB)
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD