Board logo

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

§@ªÌ: guaga    ®É¶¡: 2013-11-6 18:29     ¼ÐÃD: ¦p¦ó±N"±ÄÁʳæ"¤º®e¨Ì§Ç¼g¤J¥t¤@­Ósheet?

·Q½Ð°Ý¤@¤U¦U¦ìVBA°ª¤â~
³Ìªñ¦b¬ã¨s¤@­Ó¯àÅý
¦p¦ó±N"±ÄÁʳæ"¤º®e¨Ì§Ç¼g¤J¥t¤@­Ó"®w¦s°O¿ý"sheet?
(¥»¨Ó·Q­n¥Îªþ¥[ÀÉ®× ·|¤ñ¸û¦n»¡©ú ¥i¬Oªþ¥[¤£¤W¨Ó)

¦³ÂI¹³
https://www.youtube.com/watch?v=deRlUjhIHOo   
³oºØª¬ªp

¥H¤U¬O¼gªº¸ê®Æ,¤w¸g·Q¤F¦n¤[ª¦¤Fº¡¦hªº¤å °£¤F¬Ý¤£À´ªº¤§¥~
§Ú³o­Ó·s¤â´N¬O¤£·|¼g§r
³Â·Ð¦U¦ì¤F

Sub ¼g¤J¸ê®Æ()
If Range("A:A").End(xlDown).Row = 65536 Then
End If
Dim a(10)
a(0) = Range("B5")
a(1) = Range("D5")
a(2) = Range("J5")
a(3) = Range("C6")
a(4) = Range("B9")
a(5) = Range("D9")
a(6) = Range("E9")
a(7) = Range("F9")
a(8) = Range("G9")
a(9) = Range("H9")
a(10) = Range("I9")


Sheets("®w¦s°O¿ý").Select

End Sub
§@ªÌ: Kubi    ®É¶¡: 2013-11-6 18:55

Sub test()
    Dim arr
    Sheets("±ÄÁʳæ").Select
    arr = Array([B5], [D5], [J5], [C6], [B9], [D9], [E9], [F9], [G9], [H9], [I9])
    Sheets("®w¦s°O¿ý").Select
    Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr)) = arr
End Sub
§@ªÌ: stillfish00    ®É¶¡: 2013-11-6 19:35

¦^´_ 1# guaga
¤¹³\¤W¶ÇªºÀɮתþ¥óÃþ«¬¬°:chm, pdf, zip, rar, tar, gz, bzip2, gif, jpg, jpeg, png¡C
©Ò¥H¡AÀ£ÁY«á¦A¤W¶Ç§a
§@ªÌ: guaga    ®É¶¡: 2013-11-7 08:48

¦^´_ 2# Kubi
§A¦n §Ú¸Õ¹L³o¼Ëªº¤èªk ¤£¹L ¤£¦æ­C
¤wªþ¤WÀÉ®×
§@ªÌ: guaga    ®É¶¡: 2013-11-7 08:48

¦^´_ 3# stillfish00


    §A¦n,§Ú¤w¸g¥I¤WÀɮפF ³Â·Ð§A¤F
§@ªÌ: guaga    ®É¶¡: 2013-11-7 09:05

¦^´_ 2# Kubi

§Ú¤w¸g§Ë¦n¤F «D±`ÁÂÁ§A  ¬O§Ú¦Û¤v§âÄæ¦ì¶ñ¿ù©Ò¥HÅã¥Ü¤£¥X¨Ó
¤£¹L"«~¦W"ªº¦a¤è ¦³¸ê®Æ,«oÅã¥Ü¤£¥X¨Ó­C

Sub test()
    Dim arr
    Sheets("±ÄÁʳæ").Select
    arr = Array([D5], [J5], [B6], [C10], [D10], [E10], [F10], [G10], [H10], [I10], [J10])
    Sheets("±ÄÁÊ°O¿ý").Select
    Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr)) = arr
End Sub
§@ªÌ: GBKEE    ®É¶¡: 2013-11-7 16:22

¦^´_ 6# guaga
  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], .[J5], .[B6], .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)) = arr
  9.         Next
  10.     End With
  11. End Sub
½Æ»s¥N½X

§@ªÌ: guaga    ®É¶¡: 2013-11-7 16:35

¦^´_ 7# GBKEE

ª©¥D§A¦n
³o¼Ë¨Ï¥Î¤W¨S¦³°ÝÃD
¥i¬O¿é¤J¤Uµ§¸ê®Æ®É¯à¤§«eªº¸ê®Æ´N·|¤£¨£ ¦³¸Ñ¶Ü
§@ªÌ: GBKEE    ®É¶¡: 2013-11-8 06:41

¦^´_ 8# guaga
³o¦æµ{¦¡½X¾n¸Ñ±¼
  1. 'Sheets("±ÄÁÊ°O¿ý").UsedRange.Offset(1).Clear
½Æ»s¥N½X

§@ªÌ: guaga    ®É¶¡: 2013-11-8 07:57

¦^´_ 9# GBKEE
ÁÂÁª©¥DÀ°§Ú¸Ñ¨M³o­Ó°ÝÃD
¥i¥H¶¶«K½Ð°Ý¤@¤U ¤@¶}©l§Ú¼gªº¨º­Óµ{¦¡ ¬°¬Æ»ò·|¦æ¤£³q¶Ü?
§@ªÌ: GBKEE    ®É¶¡: 2013-11-8 08:12

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

[attach]16629[/attach]
§@ªÌ: c_c_lai    ®É¶¡: 2013-11-8 08:16

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

¦^´_ 7# GBKEE
½Ð±Ð±z­n¦p¦ó³B²z (µ{¦¡ #7)¡A¦p¹Ï¡G
[attach]16628[/attach]
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
§@ªÌ: GBKEE    ®É¶¡: 2013-11-8 08:29

¥»©«³Ì«á¥Ñ 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

§@ªÌ: guaga    ®É¶¡: 2013-11-8 08:46

¦^´_ 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
§@ªÌ: c_c_lai    ®É¶¡: 2013-11-8 09:03

¦^´_ 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
§@ªÌ: GBKEE    ®É¶¡: 2013-11-8 09:13

¦^´_ 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

§@ªÌ: c_c_lai    ®É¶¡: 2013-11-8 09:21

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

¦^´_ 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
§@ªÌ: GBKEE    ®É¶¡: 2013-11-9 09:46

¦^´_ 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

§@ªÌ: c_c_lai    ®É¶¡: 2013-11-9 10:39

¦^´_ 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
[attach]16651[/attach]
§@ªÌ: hu0318s    ®É¶¡: 2013-11-13 22:25

³øºpªO¥D§Ú¬O·s¤â¥i¥H½Ð±Ð¤@¤U¹ï³o¦æµ{¦¡¤£¤Ó¤F¸Ñ  ¬O¨ìSheets("±ÄÁÊ°O¿ý").µM«á±q³Ì«á¤@¦CµM«á¦barr¤ºªº¤º®e¶K¤W¶ÜSheets("±ÄÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr)) = arr
§@ªÌ: GBKEE    ®É¶¡: 2013-11-14 07:00

¦^´_ 21# hu0318s
Sheets("±ÄÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr)) = arr

[A65536].End(3).Row-> ¥ÑA65536©¹¤W¨ì²Ä1­Ó¦³¸ê®Æªº¦C¸¹(.Row)
Sheets("±ÄÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1)-> Sheets("±ÄÁÊ°O¿ý").Cells(¦C¸¹,Ä渹)   

Resize ¤èªk:  ½Õ¾ã«ü©wªº½d³ò¡C¶Ç¦^ Range ª«¥ó¡A¸Óª«¥ó¥Nªí½Õ¾ã«áªº½d³ò¡C
UBound ¨ç¼Æ ¶Ç¦^ Long­È¡Aªí¥Ü«ü©w°}¦C¬Yºû³Ì¤j¥i¨Ï¥Îªº°}¦C¯Á¤Þ (µ¥¦P­pºâ°}¦C¬Yºû¤¸¯Àªº¼Æ¶q)
¨Ò Sheets("±ÄÁÊ°O¿ý").Cells(1,1).Resize(1,10)->½Õ¾ã«áªº½d³ò: A1:J1=arr
    Sheets("±ÄÁÊ°O¿ý").Cells(3,2).Resize(1,10)->½Õ¾ã«áªº½d³ò: B3:K3=arr
§@ªÌ: guaga    ®É¶¡: 2013-11-25 18:59

¦^´_ 7# GBKEE
¤£¦n·N«ä ¤µ¤Ñ¦b°µ§OªºªF¦èªº®É­Ôµo²{
§Ú¥Î¦P¼Ëªºªí®æ §ï¤F´X­Ó¦r ´N§¹¥þ¤£²z§Ú'¤F?
    Option Explicit
    Sub test()
        Dim arr, i As Integer
        Sheets("­qÁÊ°O¿ý").UsedRange.Offset(1).Clear
        With Sheets("­qÁʳæ")
            For i = 8 To .[B16].End(xlUp).Row
                arr = Array(.[B5], .[D5], .[J5], .[B6], .Cells(i, "B"), .Cells(i, "A"), .Cells(i, "E"), .Cells(i, "F"), .Cells(i, "G"), .Cells(i, "H"), .Cells(i, "I"), .Cells(i, "J"))
                Sheets("­qÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr)) = arr
            Next
        End With
    End Sub
§@ªÌ: GBKEE    ®É¶¡: 2013-11-25 19:34

¦^´_ 23# guaga
  1. With Sheets("­qÁʳæ")
  2.              MsgBox  .[B16].End(xlUp).Row  '¦pªG<8 For : Not Work  
  3.             For i = 8 To .[B16].End(xlUp).Row
½Æ»s¥N½X
¦p¤£¬OªþÀɬݬÝ
§@ªÌ: guaga    ®É¶¡: 2013-11-26 11:54

¦^´_ 24# GBKEE

[attach]16874[/attach]
¤wªþ¤WÀÉ®×
³Â·Ðª©¥D¸Ñ¨M¤F:dizzy:
§@ªÌ: GBKEE    ®É¶¡: 2013-11-26 12:30

¦^´_ 25# guaga
½Ð¦b§AªþÀɤW¸Õ¸Õ¬Ý
  1. Option Explicit
  2.     Sub TEST1()
  3.         Dim arr, i As Integer
  4.         With Sheets("­qÁʳæ")
  5.         MsgBox .[B15].End(xlUp).Row                             '¦]AÄæ,BÄæ ¬O¦X¨ÖªºÀx¦s®æ,BÄæ¬OªÅ¥Õªº
  6.         MsgBox .[A17].End(xlUp).Row                             '¦p¹Ï¥Ü .[A10:A16] ³£¦³¸ê®Æ =>10
  7.             For i = 10 To Application.CountA(.[A10:A16]) + 9    'CountA : ­pºâ[A10:A16]ªº¸ê®Æ¼Æ(¸ê®Æ¤@©w­n¬O³sÄòªº)
  8.                 arr = Array(.[L4], .[N4], .[L7].Text, .Cells(i, "A"), .Cells(i, "C"), .Cells(i, "E"), .Cells(i, "H"), .Cells(i, "I"), .Cells(i, "J"), .Cells(i, "L"))
  9.                     '.[L7]¸ê®Æ¤é´Á,¬O¼Æ¦r,.[L7].Text ¥i¶Ç¦^¤é´Áªº®æ¦¡
  10.                 Sheets("­qÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr)) = arr
  11.             Next
  12.         End With
  13.     End Sub
½Æ»s¥N½X
[attach]16875[/attach]
§@ªÌ: guaga    ®É¶¡: 2013-11-26 14:10

¦^´_ 26# GBKEE

MsgBox .[B15].End(xlUp).Row      ³o¬q ¥[¶i¥hªº¸Ü ¶]°_¨Ó¥u·|Åã¥Ü¤@¬q
«á¨Ó§Ú§ï¦¨

    Option Explicit
        Sub TEST1()
            Dim arr, i As Integer
            With Sheets("­qÁʳæ")
                For i = 10 To Application.CountA(.[A10:A16]) + 9
                    arr = Array(.[L4], .[N4], .[L7].Text, .Cells(i, "A"), .Cells(i, "C"), .Cells(i, "E"), .Cells(i, "H"), .Cells(i, "I"), .Cells(i, "J"), .Cells(i, "L"))
                        
                    Sheets("­qÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr)) = arr
                Next
            End With
        End Sub

¤£¹L³ÆµùÄæ¶]¤£¥X¨Ó­C  ¬O¤£¬O¤]­n¼Ð¬W text?
§@ªÌ: GBKEE    ®É¶¡: 2013-11-26 15:13

¦^´_ 27# guaga
¨Ò AR(0 TO 10) ³o°}¦C¦@¦³11­Ó¤¸¯À :  °}¦C¤U­­¯Á¤Þ­È=0  , °}¦C¤W­­¯Á¤Þ­È=10  
UBound(arr): UBound¶Ç¦^°}¦C¤W­­¯Á¤Þ­È
  1. Option Explicit
  2. Sub TEST1()
  3.     Dim arr, i As Integer
  4.     With Sheets("­qÁʳæ")
  5.         For i = 10 To Application.CountA(.[A10:A16]) + 9
  6.             arr = Array(.[L4], .[N4], .[L7].Text, .Cells(i, "A"), .Cells(i, "C"), .Cells(i, "E"), .Cells(i, "H"), .Cells(i, "I"), "=RC[-1]*RC[-2]", .Cells(i, "J"), .Cells(i, "L"))
  7.             Sheets("­qÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr) + 1) = arr
  8.         Next
  9.     End With
  10. End Sub
½Æ»s¥N½X

§@ªÌ: guaga    ®É¶¡: 2013-11-27 17:07

¦^´_ 28# GBKEE
§Ú¤F¸Ñ¤F  ¯uªº«D±`ÁÂÁª©¥D
¤£¹LÁÙ¦³­Ó°ÝÃD·Q½Ð±Ð¤@¤U  ¦pªG­n¦b  sheet ­qÁÊ°O¿ý  ¨ºÃä¦h¥[¤@Äæ
§ï¦¨
Sheets("­qÁÊ°O¿ý").Cells([B65536].End(3).Row + 1, 1).Resize(1, UBound(arr)) = arr

¥i¬OÁÙ¬O±qAÄæ¶}©l¶ñ?
§@ªÌ: GBKEE    ®É¶¡: 2013-11-27 17:24

¦^´_ 29# guaga
sheet ­qÁÊ°O¿ý,¨ºÃä¦h¥[¤@Äæ:  ³oarr¬O§A¨ÌSheets("­qÁÊ°O¿ý")Äæ¦ì¤º®e©Ò«ü©wªº¤¸¯À
§A¬O­n­×¥¿ ³oarr, °t¦X³o [¦h¥[¤@Äæ]
­ì¥»³oarr = Array(.[L4], .[N4], .[L7].Text, .Cells(i, "A"), .Cells(i, "C"), .Cells(i, "E"), .Cells(i, "H"), .Cells(i, "I"), "=RC[-1]*RC[-2]", .Cells(i, "J"), .Cells(i, "L"))
Sheets("­qÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 1).Resize(1, UBound(arr)+1) = arr

¥i¬OÁÙ¬O±qAÄæ¶}©l¶ñ? : Cells([A65536].End(3).Row + 1, 1) => Cells(¦C¼Æ, Äæ¼Æ):   ¦C¼Æ->¼Æ¦r ,Äæ¼Æ->¼Æ¦r,¦r¦ê-> 1="A"Äæ ,2="B"Äæ ,27="AA"Äæ
§@ªÌ: guaga    ®É¶¡: 2013-11-28 13:20

¦^´_ 30# GBKEE

·PÁª©¥D,§Ú§ï¦¨
Sheets("­qÁÊ°O¿ý").Cells([A65536].End(3).Row + 1, 2).Resize(1, UBound(arr) + 1) = arr
¤£¹L³o­Ó¦³®É­Ô³£·|¸õ¨ì A1048576ªºÀx¦s®æ¥h
¦³¤°»ò¿ìªk¸Ñ¨M?
§@ªÌ: GBKEE    ®É¶¡: 2013-11-28 16:12

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-11-28 16:13 ½s¿è

¦^´_ 31# guaga
¥i¯à¬OSheets("­qÁÊ°O¿ý")AÄ椤ªºÀx¦s®æ¦³§¹¥þ¬OªÅ¥Õ¦r¤¸ªº¦r¦ê(¤£·|Åã¥Ü,©Ò¥H¬Ý¤£¨£)
°õ¦æ¤@¦¸³oµ{§Ç,¥i®ø°£ªÅ¥Õªº¦r¤¸

LTrim¡BRTrim »P Trim ¨ç¼Æ
¶Ç¦^¤@­Ó¨S¦³«eÀYªÅ¥Õ (LTrim)¡B«á­±ªÅ¥Õ (RTrim) ©Î«e«á§¡µLªÅ¥ÕªºVariant (String)¡A¨ä¤¤©Ò§t¬°µ¹©wªº¦r¦ê
  1. Option Explicit
  2. Sub Ex()
  3.     Dim E As Range
  4.     With Sheets("­qÁÊ°O¿ý")
  5.         For Each E In .Range("A:A").SpecialCells(xlCellTypeConstants, 3)
  6.             E = Trim(E)
  7.         Next
  8.         MsgBox Range("A65536").End(xlUp).Address
  9.    End With
  10. End Sub
½Æ»s¥N½X

§@ªÌ: guaga    ®É¶¡: 2013-11-29 10:25

¦^´_ 32# GBKEE
¦]¬°A:A  ¦³±a¤½¦¡ ©Ò¥H¤£¯à¥Î³o­Ó¤èªk§â¤½¦¡²M±¼
©Ò¥H·|¶Ã¶]ªº­ì¦] ¬O¦]¬°A:A ¦³±a¤½¦¡ªºÃö«Y¶Ü
§@ªÌ: GBKEE    ®É¶¡: 2013-11-29 10:28

¦^´_ 33# guaga
½ÐªþÀɬݬÝ




Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)