条件を
「数字だけ」のシート、とすれば将来\u0026quot;集計\u0026quot;などの他の文字列を名前付けても使えるので便利かも、
数字だけのシートのH2セルに数式を入れます。
※少しコンパクトにしています。
Sub Sample()
Dim WS As Worksheet
With Workbooks.Open(ThisWorkbook.Path \u0026amp; \u0026quot;\\TEST_Book.xlsx\u0026quot;)
For Each WS In ActiveWorkbook.Worksheets
If IsNumeric(WS.Name) Then
WS.Cells(2, \u0026quot;H\u0026quot;) = \u0026quot;= $E$2\u0026quot;
End If
Next WS
End With
ActiveWorkbook.Close SaveChanges:=True
MsgBox \u0026quot;VBAの実行が終わりました\u0026quot;
End Sub