乔山办公网我们一直在努力
您的位置:乔山办公网 > excel表格制作 > 如何取得当前工作表在本工作簿中的序号?用函数-excel工作表编号,excel工作表最多有多少列

如何取得当前工作表在本工作簿中的序号?用函数-excel工作表编号,excel工作表最多有多少列

作者:乔山办公网日期:

返回目录:excel表格制作


Option Explicit

Sub test()
Dim sh As Worksheet
For Each sh In Worksheets
sh.Activate
sh.Name = Range("a1")
Next
End Sub
----------------------------------------------------------------


编号即行号copy和列号的组合,列号就是上面的A.B.C.D…,行号就是竖排的1.2.3.4……比如B3(B对下来与3横过来的相交那一格.B5,H8等
如果你工具栏设置完善的话,当你选中那一格时,工作表的左上方会显示其编号

写了一段代码,汇zd总到sheets(3),如果你的表格是其他名字,请修改为sheets(“你的汇总表名字”),例子请下载附件查看。

Sub huizong()

Dim sh As Worksheet

For Each sh In ThisWorkbook.Worksheets

    If sh.Index <> "3" Then       ‘如果你的表为xx,情修改为if sh.name <> "xx"  then

        sh.Range("A1:C11").Copy

        Sheets(3).Select

        Cells(1048576, 1).End(xlUp).Select

        If Selection.Value = "" Then

            Sheets(3).Paste

        Else

            Cells(1048576, 1).End(xlUp).Offset(1, 0).Select

            Sheets(3).Paste

        End If

    Else

    End If

Next

End Sub


相关阅读

关键词不能为空
极力推荐

ppt怎么做_excel表格制作_office365_word文档_365办公网