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

[µo°Ý] ¸ê®ÆÃþ«¬·¥­­

[µo°Ý] ¸ê®ÆÃþ«¬·¥­­

¦U¦ì¤j¤j±z­Ì¦n §Ú¤ñ¸û±`»Ý­n§â¦h­Ó¤u§@ªí·J¾ã¦¨¤@­Ó¤u§@ªí¤¤   §Ú§â¸ê®ÆÃþ«¬§Ë¨ì Integer ¤´µMÁÙ¬O¤£¤Ó°÷¥Î
§Ú°O±oExcel³Ì¤jÀx¦s®æ¬O¤@¦Ê¸U ¦³¥i¯à±NÃþ«¬§Ë¨ì³o­Ó¤j¤p¶Ü ©ÎªÌÅý³o­Ó­­¨î¥i¥H¼W¥[ ³Â·Ð¤j¤j­Ì¤F


¡@¡@Sub CombineSheet()
¡@¡@Dim i, j, k, n As Integer
¡@¡@n = 1
¡@¡@For i = 2 To ThisWorkbook.Sheets.Count
¡@¡@For j = 1 To ThisWorkbook.Sheets(i).UsedRange.Rows.Count
¡@¡@For k = 1 To ThisWorkbook.Sheets(i).UsedRange.Columns.Count
¡@¡@ThisWorkbook.Sheets(1).Cells(n, k).Value = ThisWorkbook.Sheets(i).Cells(j, k).Value
¡@¡@Next k
¡@¡@n = n + 1
¡@¡@Next j
¡@¡@Next i
¡@¡@End Sub

¦^´_ 1# s13983037
1. Integer ½d³ò -32,768 ¨ì 32,767 ,
    Long ½d³ò -2,147,483,648 ¨ì 2,147,483,647
    ©Ò¥H§ïLong´N¥i¥H¤F
2. Dim i, j, k, n As Integer ­nª`·N³o¼Ëªº¼gªk¥u¦³n¬O«Å§i¬° Integer¡Ai¡Bj¡Bk³£¬O«Å§i¬°variant¡C
    ¦pªG³£­n«Å§iLong¡A­n¼g¦¨³o¼Ë...
    Dim i As Long, j As Long, k As Long, n As Long
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 2# stillfish00


    ¤j¤j±z¦n §Ú­è­è¬O¹L§â¸ê®ÆÃþ«¬ÂনLong ·|Åܦ¨ªþ¥ó¤@ªºÃþ«¬

ScreenShot00081.png (11.97 KB)

ªþ¥ó¤@

ScreenShot00081.png

TOP

¦^´_ 3# s13983037
ÂI°»¿ù¡A¥´¶}°Ï°ìÅܼƵøµ¡¡A¬Ý­þ¸Ì¿ù»~¦ó®Éµo¥Í
©Î§âÀɮתþ¤W¨Ó
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 4# stillfish00

¤j¤j±z¦n ¥H¤U¬O§ÚªºVBA µ{¦¡½X ¥t¦³ªþ¥ó¤@¬°¹ÏÀÉ
    Dim i As Long, j As Long, k As Long, n As Long
    n = 1
    For i = 2 To ThisWorkbook.Sheets.Count
    For j = 1 To ThisWorkbook.Sheets(i).UsedRange.Rows.Count
    For k = 1 To ThisWorkbook.Sheets(i).UsedRange.Columns.Count
    ThisWorkbook.Sheets(1).Cells(n, k).Value = ThisWorkbook.Sheets(i).Cells(j, k).Value
    Next k
    n = n + 1
    Next j
    Next i


TOP

¦^´_ 4# stillfish00


    ªþ¤WEXCEL ¨ì¹Fªº¦æ¼Æ À³¸Ó¬°¸ê®Æ«¬ºA¤£¨¬©Ò¥HµLªk¶K¤W ³Â·Ð¤j¤j¤F

q2.png (4.8 KB)

ªþ¥ó¤G

q2.png

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD