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

[µo°Ý] ¨Ï¥ÎEnd »yªk°ÝÃD

[µo°Ý] ¨Ï¥ÎEnd »yªk°ÝÃD

§Ú¨Ï¥Î¦p¤Uªº»yªk­n¨úªº¤@¾ã¦C³Ì«á¤@­Ó¦³¸ê®ÆÀx¦s®æªº¦ì¸m,
¦ý¬O¦pªG¹J¨ìA1µL¸ê®Æ©Î¬OA1¦³¸ê®ÆA2µL¸ê®Æ®É,
x Åܼƪº­È´N·|¤£¹ï,½Ð°Ý³o­n¦p¦ó¼g¤~¯àÁקK³o­Ó°ÝÃD
x = Sheet1.Range("A1").End(xlToRight).Column

Excel 2003
x = Sheet1.Range("IV1").End(xlToLeft).Column
diabo

TOP

¦^´_ 1# wind6424
¦pªGÃiªº°O³Ì¥½¤@Äæ¨ì©³¬O­þ¤@¦æ,
©Î¬O§Æ±æ¨C­Óª©¥»³£¥i¨Ï¥ÎµL»Ý¦Ò¼{®t²§ªº¸Ü¤]¥i¥Î :

x = Sheets(1).Cells(1, Columns.Count).End(xlToLeft).Column

TOP

Excel 2003
x = Sheet1.Range("IV1").End(xlToLeft).Column
diabo µoªí©ó 2011-10-28 17:38


·PÁ diabo ¤j¤jªº¸Ñµª
ÁÂÁÂ

TOP

¦^´_  wind6424
¦pªGÃiªº°O³Ì¥½¤@Äæ¨ì©³¬O­þ¤@¦æ,
©Î¬O§Æ±æ¨C­Óª©¥»³£¥i¨Ï¥ÎµL»Ý¦Ò¼{®t²§ªº¸Ü¤]¥i¥Î :
...
luhpro µoªí©ó 2011-10-31 21:57


luhpro ¤j,
¤]¤£¬OÃiªº°O³Ì¥½¤@Äæ,
¬O¦]¬°§Úªºªí·|¤@ª½¼W¥[¸ê®Æ,
¦Ó¥B¨CÄæ³£·|¤£¤@¼Ë,
©Ò¥H§Ú»Ý­n¥Î¤@­Ó§PÂ_¦¡§ä¥X¨CÄæ³Ì«á¤@µ§¸ê®Æªº¦ì¸m,
µM«á±N·s¼Wªº¸ê®Æ¥Îµ{¦¡¦Û°Ê¥[¨ì«á­±
±zªº¤èªk¯u¤£¿ù,¦³¾Ç¨ì¤@©Û

¦ý¬O¬°¦ó¥Ñ²Ä¤@­Ó¶}©l·j´M´N·|¿ù»~,±q«á­±©¹«e´Nok ¯u¬O©_©Ç

·PÁÂ

TOP

luhpro ¤j,
¤]¤£¬OÃiªº°O³Ì¥½¤@Äæ,
.
.
¦ý¬O¬°¦ó¥Ñ²Ä¤@­Ó¶}©l·j´M´N·|¿ù»~,±q«á­±©¹«e´Nok ¯u¬O©_©Ç
wind6424 µoªí©ó 2011-11-2 21:13

1. §Ú©Ò»¡Ãiªº°O³Ì«á¤@¦æªº·N«ä¬O«ü·í¤Þ¥Î¤W­z¤è¦¡®É,
­Yı±o IV(§Y²Ä 256) Äæ(©Î 65536 ¦C)¤£®e©ö°O°_¨Ó,
¥i¥H¥Î Columns.Count(©Î Rows.Count) ¸ûª½Ä±¤]¤ñ¸û¦n°O.

2. §Úªº²z¸Ñ¬O¦¹ºØ·j´M¬O§ä¤º®eª¬ºA(¦³µL¸ê®Æ)±N­nµo¥ÍÅܤƪº¨º¤@­ÓÀx¦s®æ,
©Ò¥H·í¸ê®Æ¤¤¦³ªÅ¥ÕÀx¦s®æ®É,
·j´M´N·|°±¦b³o­Ó«D§Ú­Ì·Q­nªº¦a¤è,
¦ÛµMµ²ªG´N·|¬O¿ùªº¤F.

¤Ï¤§¨Ó»¡­Y§A¦³¨â­Óªí®æ¥B¤¤¶¡¬O¥ÎªÅ¥ÕÄæ(©Î ¦C)¨Ó°µ°Ï¹j®É,
¤W­zªº¤è¦¡´N¤£¾A¦X¥Î¨Ó§ä²Ä¤@­Óªí®æ¸ê®Æªº³Ì¥½Äæ(©Î ¦C)¤F.

TOP

1. §Ú©Ò»¡Ãiªº°O³Ì«á¤@¦æªº·N«ä¬O«ü·í¤Þ¥Î¤W­z¤è¦¡®É,
­Yı±o IV(§Y²Ä 256) Äæ(©Î 65536 ¦C)¤£®e©ö°O°_¨Ó ...
luhpro µoªí©ó 2011-11-2 21:38


·í¸ê®Æ¤¤¦³ªÅ¥ÕÀx¦s®æ®É,·j´M´N·|°±¦b³o­Ó§Ú¯à²z¸Ñ

¦ý¬O§Úªºªí®æ¤º¥u­n¬O²Ä¤@­Ó¶}©l·j´M¤£½×²Ä¤@Àx¦s®æªÅ¥Õ©Î¬O¦³¸ê®Æ´N·|¿ù»~,
±q«á­±©¹«e´Nok,³o´N´NÅý§ÚµLªk²z¸Ñ

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-11-12 10:07 ½s¿è

¦^´_ 7# wind6424
End ¤£¬O·j´M
End ÄÝ©Ê  ©w¶Ç¦^ Range ª«¥ó¡A¸Óª«¥ó¥Nªí¥]§t¨Ó·½½d³ò¤§°Ï°ìµ²§À³BªºÀx¦s®æ¡Cµ¥©ó¦b¤u§@ªí¤¤ «ö  Ctrl+¦V¤WÁä¡B Ctrl+¦V¤UÁä¡B Ctrl+¦V¥ªÁä©Î  Ctrl+¦V¥kÁä

luhpro  ÁÂÁ§ó¥¿

§A¦b1¼Ó»¡  : ¦ý¬O¦pªG¹J¨ìA1µL¸ê®Æ©Î¬OA1¦³¸ê®ÆA2µL¸ê®Æ®É,     §Aªº·N«ä: ¸ê®Æ¬O¤£³sÄòªº
©Ò¥H luhpro ªº x = Sheets(1).Cells(1, Columns.Count).End(xlToLeft).Column  ,±qÀɮ׳̫á¤@Ä橹¥ª¨ì²Ä1­Ó¦³¸ê®ÆªºÀx¦s®æ .

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2011-11-12 08:51 ½s¿è
¦^´_  wind6424
End ÄÝ©Ê  ©w¶Ç¦^ Range ª«¥ó¡A¸Óª«¥ó¥Nªí¥]§t¨Ó·½½d³ò¤§°Ï°ìµ²§À³BªºÀx¦s®æ¡Cµ¥©ó¦b¤u§@ªí¤¤ «ö Enter+¦V¤WÁä¡BEnter+¦V¤UÁä¡BEnter+¦V¥ªÁä©Î Enter+¦V¥kÁä ...
GBKEE µoªí©ó 2011-11-11 07:45

©êºp, °µ­Ó§ó¥¿,
§Ú¸Õ¤F¤@¤U«ö Enter+¦V¤UÁä¦ü¥G¤£¯à¥X²{§Ú­Ì©Ò´Á±æªº°Ê§@,
§Ú²qÀ³¸Ó¬O :
µ¥©ó¦b¤u§@ªí¤¤ «ö Ctrl+¦V¤WÁä¡BCtrl+¦V¤UÁä¡BCtrl+¦V¥ªÁä©Î Ctrl+¦V¥kÁä

¦Ó¥BÁöµM¥¦ªº©w¸q¬O "¸Óª«¥ó¥Nªí¥]§t¨Ó·½½d³ò¤§°Ï°ìµ²§À³BªºÀx¦s®æ",
¦ý¾Ú§Ú´ú¸Õµ²ªG¥¦ªº°Ê§@À³¸Ó¬O :
­Y¤U¤@®æµL¸ê®Æ´N§ä²Ä¤@­Ó¦³¸ê®ÆªºÀx¦s®æ.
¦Ó­Y¤U¤@®æ¦³¸ê®Æ´N§ä²Ä¤@­ÓµL¸ê®ÆÀx¦s®æªº«e¤@®æ(¤]´N¬O³sÄò¸ê®Æ°Ï¤¤ªº³Ì«á¤@®æ).
­YÄ~Äò«ö¤U¦P¤@²Õ«öÁä«h¨Ì¤W­z³W«hÄ~Äò²¾°ÊµJÂI,
ª½¨ì¤w²¾°Ê¨ì³Ì¥½®æ. (¤W­z¨C¦¸²¾°Ê¼ÐªºªºÀx¦s®æ¥²µM¬O "¦³¸ê®Æªº" ©Î¬O "³Ì¥½®æ" ¤§¤@)

¨äÃöÁä´N¦b©ó:
°²³] Excel Àɤ¤¦³¦h¦C¤£³sÄò¸ê®Æ,
·í§Ú­Ì¦bÀx¦s®æ A1 ¦h¦¸«ö¤U Ctrl+¦V¤UÁä ®É,
µJÂI¨Ã¤£·|°±¯d¦b "²Ä¤@¦¸§ä¨ìªºÀx¦s®æ" ¤W, <ÁöµM¥¦¤w¬O A1 Àx¦s®æ(¦P®É¤]¬O "²Ä¤@¦¸§ä¨ìªºÀx¦s®æ")©Ò¦b°Ï°ìªº "°Ï°ìµ²§À³BªºÀx¦s®æ">
¦Ó¬O·|¤@ª½²¾°Ê¤U¥hª½¨ì³Ì¥½¤@¦C¤~·|°±¤U.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-11-12 10:47 ½s¿è

¦^´_ 9# luhpro
   «ü©w½d³ò¤º¦³¤£³sÄòªº¸ê®Æ, ³Ì«á¤@­Ó¦³¸ê®ÆªºÀx¦s®æ¿ï©w
  1. Sub Ex()
  2.     Dim Rng As Range
  3.     Set Rng = [B5:B50]
  4.     Set Rng = Rng.SpecialCells(xlCellTypeConstants)
  5.     Set Rng = Rng.Areas(Rng.Areas.Count)
  6.     Rng.Cells(Rng.Rows.Count, 1).Select
  7. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤@¥y·Å·xªº¸Ü¡A´N¹³©¹§O¤H¨­¤WÅx­»¤ô¡A¦Û¤v·|ªg¨ì¨â¤Tºw¡C
ªð¦^¦Cªí ¤W¤@¥DÃD