Excel 2007选项卡名称更改

时间:2015-09-16 10:41:06

标签: excel

我希望更改工作簿标签名称,单元格A1的前6个字符

sheet1 cell A1 248450 Footage 16-12-2013 - TO - 18-12-2013

sheet2 cell A1 254278 Footage 16-12-2013 - TO - 18-12-2013

sheet3 cell A1 248789 FOOTAGE从2013年12月16日至2013年12月18日

sheet4 cell A1 248125 FOOTAGE from 16-12-2013 - TO - 18-12-2013

标签名称更改如下

sheet1名称248450

sheet2 name 254278

sheet3名称248789

sheet4 name 248125

1 个答案:

答案 0 :(得分:0)

这应该有效

Sub Macro1()
Sheets("Sheet1").Name = Left(A1,6)
Sheets("Sheet2").Name = Left(A1,6)
Sheets("Sheet3").Name = Left(A1,6)
Sheets("Sheet4").Name = Left(A1,6)
End Sub