6,210
社区成员
发帖
与我相关
我的任务
分享
Sub Test1()
Sheets("Sheet1").Select
Range("A1").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
intLastRow = Selection.Row + Selection.Rows.Count - 1
intRowHeight = 106
Do While True
i = i + 1
If (i - 1) * intRowHeight + 1 > intLastRow Then
Exit Do
End If
Range(Cells((i - 1) * intRowHeight + 1, 1), Cells(i * intRowHeight, 1)).Select
Selection.Copy
Sheets("Sheet2").Select
Range("A" & i).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("Sheet1").Select
Loop
End Sub
ActiveSheet.Cells(1, 1).CurrentRegion.Select
ActiveSheet.Range("A1:A3411").Select
Sub book1()
Dim rNum As Long
Dim i As Long
Dim workRg As String
Sheets("Sheet1").Select
rNum = Rows(1).CurrentRegion.Count
For i = 1 To Int(rNum / 106) + 1
workRg = (i - 1) * 106 + 1 & ":" & i * 106
Rows(workRg).Select
Selection.Copy
Sheets("Sheet2").Select
Range("A" & i).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("Sheet1").Select
Next i
End Sub
Sub book1()
Dim rNum As Long
Dim i As Long
Dim workRg As String
Sheets("Sheet3").Select
rNum = Rows(1).CurrentRegion.Count
For i = 1 To Int(rNum / 106) + 1
workRg = (i - 1) * 106 + 1 & ":" & i * 106
Rows(workRg).Select
Selection.Copy
Sheets("Sheet4").Select
Range("A" & i).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("Sheet3").Select
Next i
End Sub
Sub Test1()
Sheets("Sheet1").Select
ActiveSheet.Cells(1, 1).CurrentRegion.Select
intLastRow = Selection.Row + Selection.Rows.Count - 1
intRowHeight = 106
Do While True
i = i + 1
If (i - 1) * intRowHeight + 1 > intLastRow Then
Exit Do
End If
Range(Cells((i - 1) * intRowHeight + 1, 1), Cells(i * intRowHeight, 1)).Select
Selection.Copy
Sheets("Sheet2").Select
Range("A" & i).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("Sheet1").Select
Loop
End Sub