tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,210
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I want to add that column "A" must = "Active" for the column to not be hidden in this macro that works great.
any ideas how I can do this?
thanks
Tony
Heres my macro
I want to add that column "A" must = "Active" for the column to not be hidden in this macro that works great.
any ideas how I can do this?
thanks
Tony
Heres my macro
Code:
Sub Hide_Contr()
Dim s As Range, c As Range
Date1 = ThisWorkbook.Sheets("Date").Range("B2").Value
LastRow3 = Sheets(Date1).Cells(Rows.Count, "A").End(xlUp).Row + 50
Set s = Range("I10", "I" & LastRow3)
For Each c In s
If c.Value = "Tony" Or c.Value = "All" Then[COLOR=#ff0000] ''(Here I want it to say and Column A of that row = "Active" then)[/COLOR]
c.EntireRow.Hidden = False
Else
c.EntireRow.Hidden = True
End If
Next c
End Sub