I have code for a button that works aI would like to add an If statement that only changes the text in that cell if it already equals a specific value,
the orriginal code is:
i tried![]()
Sub Button1_Click() Dim WS_Count As Integer Dim I As Integer Dim WS_Name As String WS_Count = ActiveWorkbook.Worksheets.Count For I = 1 To WS_Count Sheets(I).Select ActiveSheet.[E71] = "BASE_***_UP" Next I End Sub
But it keeps giving me the error "Next without For"![]()
WS_Count = ActiveWorkbook.Worksheets.Count For I = 1 To WS_Count Sheets(I).Select If ActiveSheet.[E71] = "BASE_***_DN" Then ActiveSheet.[E71] = "BASE_***_UP" Else Next I
Bookmarks