Hi All,
The below code currently worked on active sheet fine, i want to change to run on two sheets Master1, Master2 rather then all?
Option Explicit Sub RowsVisibleUnVisible() Dim i As Long Dim LastRow As Long ‘turn off screenupdating so the screen does not flick Application.ScreenUpdating = False ‘count whats the lst cell in the sheet using Column “A” as refference ”LastRow = Cells(Rows.Count, “A”).End(xlUp).Row LastRow = Sheet2.UsedRange.Rows.Count ‘go through all rows from number 1 to the last cell determined above For i = 1 To LastRow ‘if the value of the cell in column “D” is null, or empty then If Cells(i, 4).Value = vbNullString Then ‘if the above is true then hide the entire row Cells(i, 4).EntireRow.Hidden = True Else ‘for any other scenario including that there is a value then unhide the row Cells(i, 4).EntireRow.Hidden = False End If Next i Application.ScreenUpdating = True End Sub