Excel表格网

excel 一个格式表格,编号不同。怎么批量生成?

145 2024-01-02 01:46 admin   手机版
https://www.zhihu.com/video/1406434148991442944
Sub prtTag()
    Dim ic As Integer
    Dim i As Integer
    Dim j As Integer
    Application.ScreenUpdating = False
    Sheets("数据").Select
    ic = ActiveSheet.UsedRange.Rows.Count - 1
    Sheets("生成结果").Select
    Cells.Select
    Selection.Clear
    ActiveSheet.DrawingObjects.Select
    Selection.Delete
    Sheets("模板").Rows("1:10").Copy
    For i = 1 To ic
        Range("A" & (i - 1) * 10 + 1).Select
        Selection.PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
            SkipBlanks:=False, Transpose:=False
        ActiveSheet.Paste
    Next i
    For i = 1 To ic
        Cells((i - 1) * 10 + 2, 5) = Sheets("数据").Cells((i - 1) + 2, 1)
    Next i
    Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub

已同步B站

Excel VBA生成预约单/价签/箱唛/标签_哔哩哔哩_bilibili
顶一下
(0)
0%
踩一下
(0)
0%
相关评论
我要评论
用户名: 验证码:点击我更换图片