This code is hiding all columns starting from row 3, column 7, where the value is bold.
But I want the loop to stop when row 3 contains the value "x".
How do I add this to the formula?
But I want the loop to stop when row 3 contains the value "x".
How do I add this to the formula?
Code:
Sub boldhide()
Application.ScreenUpdating = False
ActiveSheet.DisplayPageBreaks = False
For c = 7 To ActiveSheet.UsedRange.Columns.Count
Cells(3, c).EntireColumn.Hidden = Cells(3, c).Font.Bold = False
Next c
End Sub