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

[µo°Ý] ¸ê®Æ¶K¦Ü¥t¤@¬¡­¶³Ì«á¤@¦C¦ì¸m

[µo°Ý] ¸ê®Æ¶K¦Ü¥t¤@¬¡­¶³Ì«á¤@¦C¦ì¸m

½Ð°Ý¦U¦ì¤j¤j¥¨¶°°ÝÃD TEST.rar (18.26 KB)
¸ê®Æ·Q±q¤u§@ªí1½d³òA2:D3¡Acopy¦Ü ¤u§@ªí2°_ÂIÄæ¦ìA2¡A¨C¦¸½Æ»s³£¬O¶K¦Ü¤u§@ªí2ªº³Ì«á¤@¦C
¥i¬O¬°¤°»ò²Ä¤@µ§½Æ»s¬O±q¤u§@ªí2Äæ¦ìA12¶}©l¶K¤W©O¡H:'( :'( :'( :'(

Sub test()
Dim EndRow
Sheets("¤u§@ªí1").Select
Range("A2:D3").Select
Selection.Copy
Sheets("¤u§@ªí2").Select
EndRow = ActiveSheet.UsedRange.Rows.Count + 1
Range("a" & EndRow).PasteSpecial Paste:=xlPasteValues
Sheets("¤u§@ªí1").Select

End Sub
Awii

§A¥i¯à¿é¤J¹L¸ê®Æ¡Ausedrange´N°O¿ý¨Ï¥Î¹Lªº¦ì§}¤F¡AÁöµM²¾°£Àx¦s®æ¤º®e¡A¦ýÁÙ¬O¦³Àx¦s®æªº®æ¦¡³Q°O¿ý¤F

°Ñ¦Ò¡G
https://stackoverflow.com/questions/50434444/why-i-use-worksheet-usedrange-rows-count-got-wrong-result/50434743

TOP

¦^´_ 2# prin.huang


    ·PÁÂprin.huang¡A°ÝÃD¸Ñ¨M¡A·P®¦¡C
Awii

TOP

        ÀR«ä¦Û¦b : ¡i¥Í©R¦b©I§l¶¡¡j¦òªû»¡¡G¡u¥Í©R¦b©I§l¶¡¡C¡v¤HµLªkºÞ¦í¦Û¤vªº¥Í©R¡A§óµLªk¾×¦í¦º´Á¡AÅý¦Û¤v¥Ã¦í¤H¶¡¡C¬JµM¥Í©R¥h¨Ó³o»òµL±`¡A§Ú­Ì§óÀ³¸Ó¦n¦n¦a·R±¤¥¦¡B§Q¥Î¥¦¡B¥R¹ê¥¦¡AÅý³oµL±`¡BÄ_¶Qªº¥Í©R¡A´²µo¥¦¯uµ½¬üªº¥ú½÷¡A¬M·Ó¥X¥Í©R¯u¥¿ªº»ù­È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD