Hi,
I have a row A3:AZ3 where I've marked certain cells Y for the columns that I'd like to hide/unhide. I've marked cells as N that I don't want to hide.
I think the tricky part is that it will eventually be a button so that the columns will hide/unhide.
I've tried using the macro recorder, help and these pages but I can't seem to get what I need.
This is what I've got so far (took from another thread) but I stress I don't know if its even close or will make any sense.
Sub HideUnhideColumns()
If Range("A3:AZ3") = "Y" Then
Range("A3:AZ3").Rows.Hidden = True
Range("A3:AZ3").Rows.Hidden = False
End If
If Range("A3:AZ3") = "N" Then
Range("A3:AZ3").Rows.Hidden = False
Range("A3:AZ3").Rows.Hidden = True
End If
End Sub
PLEASE HELP
I have a row A3:AZ3 where I've marked certain cells Y for the columns that I'd like to hide/unhide. I've marked cells as N that I don't want to hide.
I think the tricky part is that it will eventually be a button so that the columns will hide/unhide.
I've tried using the macro recorder, help and these pages but I can't seem to get what I need.
This is what I've got so far (took from another thread) but I stress I don't know if its even close or will make any sense.
Sub HideUnhideColumns()
If Range("A3:AZ3") = "Y" Then
Range("A3:AZ3").Rows.Hidden = True
Range("A3:AZ3").Rows.Hidden = False
End If
If Range("A3:AZ3") = "N" Then
Range("A3:AZ3").Rows.Hidden = False
Range("A3:AZ3").Rows.Hidden = True
End If
End Sub
PLEASE HELP