配色: 字号:
替换工作部路径,读取数据(感谢阿捏,呵呵)
2015-09-22 | 阅:  转:  |  分享 
  
SubModifiedExp()

Application.DisplayAlerts=False

DimshtAsWorksheet,t#,sAsString

t=Timer

ForEachshtInThisWorkbook.Sheets

Ifsht.Tab.Color=32768Then

s=sht.Range("C4").Formula

s=Right(s,Len(s)-InStrRev(s,"]"))

Withsht

Dimi%

Fori=3To13

.Range(.Cells(4,i),.Cells(36,i)).Formula="=''[利润总表-2015."&Format(i-1,"00")&".xls]"&s

Nexti

EndWith

s=""

EndIf

Nextsht

MsgBox"修改完毕,耗时:"&Format(Timer-t,"0.00秒!"),vbOKOnly,""

Application.DisplayAlerts=True

EndSub





注意一点:

1、标签颜色为目前绿色的即进行替换;

2、行:第4至36,列:第3至13
献花(0)
+1
(本文系小虾米海纳...首藏)