加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

excel如何把多个sheet 合并到一个sheet中

(2012-11-17 07:59:34)
标签:

excel如何把多个sheet

合并到一个sheet中

it

分类: 电脑办公

 

Sub CombineSheet()
    Dim arr, shtCount%, i&, t
    shtCount = Sheets.Count
    Application.ScreenUpdating = False
    t = Timer
    Sheets(1).Cells.ClearContents
    For i = 2 To shtCount
        With Sheets(i)
            arr = .Range(.Range("a7"), .Cells(.UsedRange.Rows.Count, .UsedRange.Columns.Count))
        End With
        Sheet1.Range("a" & Cells.Rows.Count).End(3).Offset(1, 0).Resize(UBound(arr), UBound(arr, 2)) = arr
    Next
    Application.ScreenUpdating = True
    MsgBox Timer - t
End Sub

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有