I need a VBA loop that will loop through my tabs and add an increasing number to the cell J1
The VBA needs to not need the worksheet name to be specified as it changes depending upon the imput.
Here is what I have so far
![]()
Sub Increasing Number() Dim strPath As String Dim xWs As Worksheet strPath = ActiveWorkbook.Path & "\" For Each xWs In Application.ActiveWorkbook.Worksheets If xWs.Name <> "Button" And xWs.Name <> "CopyPaste" And xWs.Name <> "RMR" And xWs.Name <> "Reformat Machine" And xWs.Name <> "Equipment" Then 'Not sure what to put here that will make it work' End If Next xWs End Sub
Bookmarks