Excel表格网

EXCEL表格如何在一个工作簿中筛选出有相同关键字的工作表,进行批量编辑?

56 2023-12-12 13:36 admin   手机版
https://www.zhihu.com/video/1403493725046235136

代码如下:

Sub test()
Dim sh As Worksheet
Dim wb1, wb2 As Workbook
Application.DisplayAlerts = False
Set wb1 = ThisWorkbook
Workbooks.Add
Set wb2 = ActiveWorkbook
For Each sh In wb1.Worksheets
    If sh.Name Like "北京市*" Then
        sh.Copy after:=wb2.Worksheets(wb2.Worksheets.Count)
    End If
Next
wb2.Sheets(1).Delete
Application.DisplayAlerts = True
End Sub

知乎视频压缩的比较模糊,已同步上传B站

Excel VBA提取指定名称的工作表_哔哩哔哩_bilibili
顶一下
(0)
0%
踩一下
(0)
0%
相关评论
我要评论
用户名: 验证码:点击我更换图片