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

[µo°Ý] ´¡¤JÀx¦s®æ«áµLªk¦Û°Ê¶ñº¡

[µo°Ý] ´¡¤JÀx¦s®æ«áµLªk¦Û°Ê¶ñº¡

¦U¦ì¥ý¶i¦n:
¤p§Ì³Ìªñ¸I¨ì¤@­Ó·Pı«Ü²³æªº°ÝÃD
AÄæ¬O²³æªº¼Æ¦C¡ABÄæ«h¬O³v¦Cª½±µ°Ñ·ÓAÄ檺­È
¦pªG¦¹®É·s¼W¤@­Ó¼Æ¦r¦bAÄæ¸ê®Æªº¤¤¶¡
¦¹®É§Ú·Q¨Ï¥ÎBÄ檺¦Û°Ê¦V¤U¶ñº¡¥\¯à·|¸I¨ìªÅ¥Õ¨º­Ó´N°±¤î
·Q½Ð°Ý¸Ó¦p¦ó§âªÅ¥Õ¨ºÄæ¦Û°Ê¶ñº¡©O? ¤ñ¸û§Æ±æ¯à¥HVBA¸Ñ¨M ÁÂÁÂ!!

3.gif (129.67 KB)

3.gif

¦^´_ 1# cathaylife
¬O³o¼Ë¶Ü?
  1. Option Explicit
  2. Sub Ex()
  3.     With Range("a1:a" & Range("a1").End(xlDown).Row)
  4.         .Offset(, 1) = .Value
  5.     End With
  6. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ª©¥D¦­:
±zªº½TÅý¨âÄæ³£¤@¼Ë¡A¦ýBÄæÅܱo¸òAÄæ¤@¼Ë³£¬O¼Æ­È¤F¡A§Úªº»Ý¨D¬Oºû«ù¦íBÄ檺¤½¦¡¦Û°Ê¶ñº¡¨ì¤U­±ªºÀx¦s®æ~

TOP

¦^´_ 3# cathaylife

ok

°ÝÃD.rar (5.85 KB)

TOP

¦^´_ 4# cathaylife
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     With Range("a1:a" & Range("a1").End(xlDown).Row)
  4.         .Offset(, 1).FillDown
  5.     End With
  6. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

·PÁª©¥D¤w¸g¥i¥H¥¿±`§@·~¤F! ¥t½Ð±Ð±z
Offset(, 1) ªº³rÂI¬O¤°»ò·N«ä? ¨ä¥LÃþ¦üªº¨ç¼Æ¸Õ¥Î¶Ü?
ÁÙ¦³´N¬Ooption explicitªº¥\¥Î§Ú¤w¸gª¾¹D¬O±j¨îÅܼƫŧi¡A¬Ý¤F¤§«e±zªº¸ÑÄÀ¬O"¤è«K°»¿ù"
¦ý§Ú¦b§Ú¦bVBA¸Ì¸Õ¹Ï¤£«Å§i´N¨Ï¥Î¡AÁÙ¬O¥i¥H¦b°Ï°ìÅܼƸ̬ݨì¸ÓÅܼƥH¤Î°»¿ù
©Ò¥H«Å§i¥H«áªº¤è«K°»¿ù¬O¬Û¹ï¤è«K¦b­þ¸Ì©O?

TOP

¦^´_ 6# cathaylife
  1. Range("A1").Offset(ColumnOffset:=5).Select
  2. Offset ÄÝ©Ê
  3. ½Ð°Ñ¾\®M¥Î¦Ü½d¨Ò¯S©w®M¥Î¦Ü Range ª«¥ó®É¥Î Offset ÄÝ©Ê¡C
  4. ¶Ç¦^ Range ª«¥ó¡A¥Î¥H¥Nªí¬Y­Ó«ü©w°Ï°ì¥H¥~ªº½d³ò¡C°ßŪ¡C
  5. expression.Offset(RowOffset, ColumnOffset)
  6. expression     ¥²¿ï¡C¸Ó¹Bºâ¦¡¶Ç¦^ Range ª«¥ó¡C
  7. RowOffset      ¿ï¾Ü©Êªº Variant¡C¥Î¦C¼Æªí¥Üªº°Ï°ì¦ì²¾ (¥¿­È¡B­t¼Æ©Î¹s (0))¡C¥¿­Èªí¥Ü¦V¤U¦ì²¾¡A­t­Èªí¥Ü¦V¤W¦ì²¾¡C¹w³]­È¬° 0¡C
  8. ColumnOffset      ¿ï¾Ü©Êªº Variant¡C¥ÎÄæ¼Æªí¥Üªº°Ï°ì¦ì²¾ (¾ã¼Æ¡B­t¼Æ©Î 0 (¹s))¡C¥¿­Èªí¥Ü¥k¦ì²¾¡A­t­Èªí¥Ü¥ª¡C¹w³]­È¬° 0¡C
½Æ»s¥N½X
¤è«K°»¿ù:¬O«üÅܼƽs¼g¤£¥¿½T¾É­P­pºâ¿ù»~±o¤£¨ì¹w´Áªº®ÄªG
·íµ{¦¡¼gªºÃe¤j®É¤£©ö§ä¥Xªº
  1. Sub Ex()
  2.     Dim xl As Integer
  3.     x1 = 5
  4.     MsgBox 10 + xl  'À³¸Ó¬O15¤~¹ï
  5. End Sub
½Æ»s¥N½X
  1. Option Explicit
  2. Sub Ex()
  3.     Dim xl As Integer
  4.     x1 = 5
  5.     MsgBox 10 + xl  'À³¸Ó¬O15¤~¹ï
  6. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

©Ò¥H¦b³o­Ó¨Ò¤l¸Ì
.Offset(, 1).FillDown
³r¸¹«e­±¨S±µªF¦è´N¬O¹w³]¦Cªº°ò·ÇÄæ¦ì¨SÅÜ ¬O¶Ü?
Option Explicit ¸Õ¤F¦n¤[¤~µo²{¬O x1 ¸ò xL....

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD