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

[µo°Ý] ½Ð±Ð¦U¦ì«e½ú¦bµ{¦¡¤½¦¡¤¤­n¦p¦ó¨ú±oÄæ¦ì³Ì«á¦C¼Æ

[µo°Ý] ½Ð±Ð¦U¦ì«e½ú¦bµ{¦¡¤½¦¡¤¤­n¦p¦ó¨ú±oÄæ¦ì³Ì«á¦C¼Æ

¥»©«³Ì«á¥Ñ lamihsuen ©ó 2012-6-21 05:30 ½s¿è

For wr = 4 To Worksheets.Count
Worksheets(wr).Range("A3").Formula = "=COUNT(B6:B51)"
Worksheets(wr).Range("J3").Formula = "=AVERAGE(B6:B51)"
next wr
¤W¦C¤¤ "=COUNT(B6:B51)"¦]¬°¨C¤@­Ó¤u§@ªí¤¤ªº"B51"¤£½T©w¦]¦¹¦b¦¹¤½¦¡¤¤¦p¦ó¨ú±o"B"Ä檺³Ì«á¦C¼Æ

¦^´_ 1# lamihsuen
  1. Sub Ex()
  2.     Dim wr, xlRow As Integer
  3.     For wr = 4 To Worksheets.Count
  4.         With Worksheets(wr)
  5.             xlRow = .Range("B" & .Rows.Count).End(xlUp).Row
  6.             .Range("A3").Formula = "=COUNT(B6:B" & xlRow & ")"
  7.             .Range("J3").Formula = "=AVERAGE(B6:B" & xlRow & ")"
  8.         End With
  9.     Next wr
  10. End Sub
½Æ»s¥N½X

TOP

ÁÂÁ GBKEE ¤j­ôªºÀ°¦£.°ÝÃD¤w¸Ñ¨M,¬O§_¥i¦AÀ°¦£,¸ÑÄÀ¤@¤U
"xlRow = .Range("B" & .Rows.Count).End(xlUp).Row"
³o¬q¦¡µ{ªº»yªk
¥t¥~¦A½Ð°Ý¦p¦ó²£¥Íµ{¦¡¥ªÃ䪺¸¹½X?
¦A¦¸ÁÂÁ§A!

TOP

¦^´_ 3# lamihsuen
"xlRow = .Range("B" & .Rows.Count).End(xlUp).Row"
.Rows.Count  :¶Ç¦^ ¦CªºÁ`¼Æ  
Rows ÄÝ©Ê  ¶Ç¦^ Range ª«¥ó(½d³ò)ªº©Ò¦³¦Cªº¶°¦X¡C
Count ÄÝ©Ê ¶Ç¦^¤@­Ó Long (ªø¾ã¼Æ)¡Aµ¥©ó¦b¤@­Ó¶°¦Xª«¥ó¤¤ªºª«¥ó¼Æ¥Ø¡C°ßŪ¡C
End ÄÝ©Ê    ¸Óª«¥ó¥Nªí¥]§t¨Ó·½½d³ò¤§°Ï°ìµ²§À³BªºÀx¦s®æ¡Cµ¥©ó«ö END+¦V¤WÁä (xlUp)¡BEND+¦V¤UÁä(xlDown)¡BEND+¦V¥ªÁä(xlToLeft)¡B END+¦V¥kÁä(xlToRight)
END+¦V¤WÁä (xlUp)¡BEND+¦V¤UÁä(xlDown)¡BEND+¦V¥ªÁä(xlToLeft)¡B END+¦V¥kÁä(xlToRight)
Row ÄÝ©Ê   ¶Ç¦^¦Cªº¸¹¼Æ¡C°ßŪ Long¡C

TOP

¦^´_ 4# GBKEE

«D±`·PÁ¤j­ô«e½úªº¸Ñ»¡.¯uªº¨ü¯q°h¨}¦h

TOP

¦^´_ 4# GBKEE


    G¤j¤j~
                    xlRow = .Range("B" & .Rows.Count).End(xlUp).Row
                    ³o¥y¨ä¹ê¥Î
                     xlRow = .Range("B65536").End(xlUp).Row
                    ·|§_§óª½Ä±¤@ÂI©O??
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 6# hugh0620


    2003¥H«e³Ì¤j¦C¬O65536¡A³o¬O°²³]¥Îªº¤£¤@©w­þ­Óª©¥»¡C

TOP

worksheetfunction.CountA([D])
À³¸Ó¥i¥H§a,«e´£­n¾ã¦C¤]没¦³ªÅ®æ¤~­p¨ì³á

TOP

¦^´_  hugh0620


    2003¥H«e³Ì¤j¦C¬O65536¡A³o¬O°²³]¥Îªº¤£¤@©w­þ­Óª©¥»¡C
oobird µoªí©ó 2012-6-22 19:24



    ¥Lªºªí®æÀ³¸Ó没³oMO­«§a;P

2010ª©¬O¤@¦Ê¸U,¹ï¤£?

TOP

¥»©«³Ì«á¥Ñ lamihsuen ©ó 2012-6-23 18:11 ½s¿è

¦^´_ 6# hugh0620
²Ä¤@¦¸ªí®æ³Ì¦h¥u¦³100¦C,µM«á­n§â²Ä¤@ªí®æ¿z¿ï²Å¦X¥Xªº¸ê®Æ¦C½Æ»s¨ì©¹¤@¤Uªºªí®æ,¦ý²Ä¤@¦¸ªí®æ¸ê®ÆÁÙ­n«O¯d,¦]¦¹§ÚÁÙ­n½Ð°Ý?
Worksheets(4).Range("A1").Value   Àx¦s®æ¦¡¤w³]©w¼Æ­È®æ¦¡,
Dim I As Integer
I = 6 + (Worksheets(4).Range("A1").Value) + 3 ½Ð°Ý»yªk¦³¿ù»~¶Ü?
¦]¬°°õ¦æ®É·|Åã¥Ü«¬ºA¤£²Åªº¿ù»~°T®§
ÁÂÁ¦U¦ì¤j­ôÀ°¦£
PS  :   xlRow = .Range("B" & .Rows.Count).End(xlUp).Row
¤U¤@¦¸ªí®æ¬O§_ÁÙ¥iÄ~Äò¨Ï¥Î¤U¥h?

TOP

        ÀR«ä¦Û¦b : ¡i®É¤é²öªÅ¹L¡j¤@­Ó¤H¦b¥@¶¡°µ¤F¦h¤Ö¨Æ¡A´Nµ¥©ó¹Ø©R¦³¦hªø¡C¦]¦¹¥²¶·»P®É¶¡Ävª§¡A¤Á²ö¨Ï®É¤éªÅ¹L¡C
ªð¦^¦Cªí ¤W¤@¥DÃD