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

[µo°Ý] ¦p¦ó±N"±ÄÁʳæ"¤º®e¨Ì§Ç¼g¤J¥t¤@­Ósheet?

¦^´_ 10# guaga
4#ªºÀɮ׶Ü?

·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2013-11-8 08:19 ½s¿è

¦^´_ 7# GBKEE
½Ð±Ð±z­n¦p¦ó³B²z (µ{¦¡ #7)¡A¦p¹Ï¡G

1. ±ÄÁʤé´Á¡B¨ì³f¤é´Á ©ó¶×¤J¦Ü "±ÄÁÊ°O¿ý"¡A¦p¦ó¯à¦P®É¶×¤J YYYYMMDD «¬ºA¡F
2. B6:C6 ¨âÄæ ¬O §¹¾ãªº "¼t°Ó" ²Õ¦X¡A­n¦p¦P¦b¼t°ÓÄæ¶×¤J®É¡A±a¤J­È¯à¬° "A001 ­Û­¸" (¦p¹Ï)¡F
3. "³Æµù" (¦P®É¸ó¶V J¡BK¡BL ¤TÄæ) ¸ê®Æ¬°¦óµLªk¶×¤J©O¡H
¤£¦n·N«ä¥´Åͱz¡A¦b¦¹¥ý¦V±z»¡ÁnÁÂÁ¡C

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-11-8 08:33 ½s¿è

¦^´_ 12# c_c_lai
  1. Option Base ³¯­z¦¡
  2. ¦b¼Ò²Õ¼h¦¸¤¤¥Î¨Ó«Å§i°}¦C¯Á¤Þªº¹w³]¤U­­¡C
  3. »yªk
  4. Option Base {0 | 1}
  5. ½Ðª`·N
  6. ­Y¹w³]ªº¤U­­­È¬° 0¡A«h Option Base ³¯­z¦¡¬O¤£»Ý­nªº¡C­Y»Ý­n¨Ï¥Î®É¡A¦¹³¯­z¦¡¥²¶·¥X²{¦b¼Ò²Õ¤¤¡A¨Ã¥B¦b¥ô¦óµ{§Ç¤§«e¡COption Base ¶È¯à¦b¼Ò²ÕùØ¥X²{¤@¦¸¡A¦Ó¥B¥²¶·¦b§t¦³ºû¼Æªº°}¦C«Å§i¤§«e¡C
  7. ªþµù ¦b Dim¡BPrivate¡BPublic¡BReDim ©M Static ³¯­z¦¡¤¤¡ATo ¤l¥y´£¨Ñ¸û¨ã¼u©Êªº¤èªk¡A¨Ó±±¨î°}¦C¯Á¤Þªº½d³ò¡CµM¦Ó¡A¦pªG¤£¨Ï¥Î To ¤l¥y¨Ó©ú½Tªº³]©w¤U­­¡A«h¥i¥Î Option Base ¨Ó§ïÅܹw³]­Èªº¤U­­¬° 1¡CArray ¨ç¼Æ©Ò«Ø¥ßªº°}¦C¹w³]¤U­­¥²¬°¹s¡A¤£¨ü Option Base ©Ò¼vÅT¡C
  8. Option Base ³¯­z¦¡¥u¼vÅT¥¦©Ò¦bªº¼Ò²Õùؤ§°}¦Cªº¤U­­¡C
½Æ»s¥N½X
  1. Option Explicit
  2. Sub test()
  3.     Dim arr, i As Integer
  4.     Sheets("±ÄÁÊ°O¿ý").UsedRange.Offset(1).Clear
  5.     With Sheets("±ÄÁʳæ")
  6.         For i = 10 To .[B30].End(xlUp).Row
  7.             arr = Array(.[B5], .[D5].Text, .[J5], .[B6] & .[c6], .Cells(i, "B"), .Cells(i, "D"), .Cells(i, "E"), .Cells(i, "F"), .Cells(i, "G"), .Cells(i, "H"), .Cells(i, "I"), .Cells(i, "J"))
  8.             Sheets("±ÄÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr) + 1) = arr
  9.         Next
  10.     End With
  11. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 12# c_c_lai


1. ±ÄÁʤé´Á¡B¨ì³f¤é´Á ©ó¶×¤J¦Ü "±ÄÁÊ°O¿ý"¡A¦p¦ó¯à¦P®É¶×¤J YYYYMMDD «¬ºA
§Ú¥uª¾¹D ¥i¥H¦b§A¿ï¨úªºÀx¦s®æ /¥kÁä/Àx¦s®æ®æ¦¡/¼Æ­È-¤é´Á
¿ï¾Ü§Y¥i

TOP

¦^´_ 13# GBKEE
¦^´_ 14# guaga
À³¥Î .[D5].Text (±ÄÁʤé´Á)¡B  .[J5].Text (¨ì³f¤é´Á) ¤w¸gOK¡A
¦ý¬O "³Æµù" ¸ê®Æªº¶×¤JÁÙ¬OµLªk±a¤J¡A §ï¦¨ .Cells(i, "J").Text
µ²ªG¤@¼Ë¡A³Â·Ð±z¤F¡AÁÂÁ¡I

TOP

¦^´_ 15# c_c_lai
  1. Option Explicit
  2. Sub test()
  3.     Dim arr, i As Integer
  4.     Sheets("±ÄÁÊ°O¿ý").UsedRange.Offset(1).Clear
  5.     With Sheets("±ÄÁʳæ")
  6.         For i = 10 To .[B30].End(xlUp).Row
  7.             arr = Array(.[B5], .[D5].Text, .[J5], .[B6] & .[c6], .Cells(i, "B"), .Cells(i, "D"), .Cells(i, "E"), .Cells(i, "F"), .Cells(i, "G"), .Cells
  8. (i, "H"), .Cells(i, "I"), .Cells(i, "J"))
  9. '******* .Cells(i, "B")  ³o¤£¤]¬O¦X¨ÖBC¨âÄæ ****************
  10.             Sheets("±ÄÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr) + 1) = arr
  11.                        '*************UBound(arr) + 1 À³¥iÅã¥Ü .Cells(i, "J")ªº¸ê®Æ  ********************
  12.         Next
  13.     End With
  14. End Sub
½Æ»s¥N½X
  1. Option Explicit
  2. Option Base 1
  3. Sub Ex()
  4.     Dim AR, S
  5.     S = "S,S,S"
  6.     S = Split(S, ",")
  7.     MsgBox UBound(S)
  8.     MsgBox LBound(S)
  9.     AR = Array(5, 6)
  10.     MsgBox UBound(AR)
  11.     MsgBox LBound(AR)
  12. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 16# GBKEE
¤Ó·P¿E±z¤F¡A§Ú«ç»ò·|¨S·Q¨ì UBound(arr) ªº°ÝÃD¡A
µoı§ÚÀK¨º¶¡´¼¼z¥¼¯à¦P®É¦¨ªø¡AÁÂÁÂËç¡I

TOP

¦^´_ 13# GBKEE
§Ú§¹¥þ¤F¸Ñ #13 ©Ò»¡ªº Option Base ¥¿½T¨Ï¥Î¤èªk¤F¡A
¦pªG¤£«Å§i¡AArray °}¦C¬O±q 0 ¶}©l°_ºâ¡A©Ò¥H UBound(arr) ­È·|¬° 11¡A
¤Ï¤§¡B«Å§i Option Base 1¡A«h Array ¬O±q 1 ¶}©l°_ºâ¡A¦]¦¹ UBound(arr) ­È·|¬° 12¡C
·PÁ±z¥J²Ó¦a»¡©ú¡I

TOP

¦^´_ 18# c_c_lai
  1. Option Explicit
  2. Option Base 0   'ªº¨Ò¥~
  3. Sub Ex()
  4.     Dim Ar(5 To 10), Br()
  5.     MsgBox UBound(Ar)
  6.     MsgBox LBound(Ar)
  7.     Br = [b3:c5].Value    '¥HÀx¦s®æ¬°°}¦C
  8.     MsgBox UBound(Br)
  9.     MsgBox LBound(Br)
  10. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 19# GBKEE
µL½×¬O Option Base 1 ©ÎªÌ¬O Option Base 0¡A¥HÀx¦s®æ¬°°}¦C±ø¥ó
¤Uªº½d¨Ò´ú¸Õ³ºµM·| Ignore Option Base ªº«Å§i¡A ÁÂÁ±zªº«ü¾É¡I

TOP

        ÀR«ä¦Û¦b : ¤â¤ß¦V¤U¬O§U¤H¡A¤â¤ß¦V¤W¬O¨D¤H¡F§U¤H§Ö¼Ö¡A¨D¤Hµh­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD