|
本帖最后由 ruoyunruyan 于 2018-6-18 13:57 编辑
- Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
- If Target.Address = "$Q$1" Then Call QDB
- End Sub
- Sub QDB()
- Dim i%, j%, k%
- k = 3
- With Sheet2
- j = .[c65536].End(3).Row
- For i = 1 To j
- If Int((i - 1) / 30) Mod 2 Then
- i = i + 29
- Else
- Cells(k, 1) = i
- Cells(k, 2) = .Cells(i + 3, 2)
- Cells(k, 3) = .Cells(i + 3, 3)
- Cells(k, 6) = i + 30
- Cells(k, 7) = .Cells(i + 33, 2)
- Cells(k, 8) = .Cells(i + 33, 3)
- k = k + 1
- End If
- Next
- End With
- <blockquote>With Sheet1.UsedRange
复制代码
插入位置不对,格式的修改在下边 |
|