Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
楼主: 兰色幻想

VBA80集第12集作业上交贴:非空行

  [复制链接]
发表于 2020-11-18 23:56 | 显示全部楼层
交作业

Sub 填充()
    Dim rng As Range
    Set rng = Intersect([b:d].SpecialCells(xlCellTypeConstants).EntireRow, [a:a])
    Columns(1).ClearContents
    rng = 1
End Sub

Sub 合并数据()
    Dim sht As Worksheet, wb As Workbook, Msht As Worksheet
    Application.ScreenUpdating = False
        Set Msht = Sheets("第2题")
        Msht.[a2:d65536].ClearContents
        Set wb = Workbooks.Open(ThisWorkbook.Path & "\A.xls")
            For Each sht In wb.Sheets
                sht.Range("a2:d" & sht.UsedRange.Rows.Count).Copy
                Msht.Cells(Msht.[a1].CurrentRegion.Rows.Count + 1, 1).PasteSpecial xlPasteValues
            Next
        wb.Close False
    Application.ScreenUpdating = True
End Sub
回复

使用道具 举报

发表于 2020-11-19 10:52 | 显示全部楼层
回复

使用道具 举报

发表于 2020-11-21 17:23 | 显示全部楼层
回复

使用道具 举报

发表于 2020-11-23 16:19 | 显示全部楼层
每日一学,天天向上
回复

使用道具 举报

发表于 2020-11-29 16:06 | 显示全部楼层
6666666666666666666
回复

使用道具 举报

发表于 2020-12-1 18:00 | 显示全部楼层
八年抗战后来看看你的答案
回复

使用道具 举报

发表于 2020-12-7 22:04 | 显示全部楼层
现在正式学习VBA,请各位多多帮助
回复

使用道具 举报

发表于 2020-12-8 14:51 | 显示全部楼层
学习一下
回复

使用道具 举报

发表于 2020-12-8 16:40 | 显示全部楼层
新手来学习学习
回复

使用道具 举报

发表于 2020-12-10 20:01 | 显示全部楼层
学习学习
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2025-8-16 05:23 , Processed in 1.020771 second(s), 4 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表