Here's what I'd suggest: put a column in your lookup table to the far right of your values. Enter TRUE or FALSE for each desired state of visibility for that row. Point your lookup formula to that, then name cell O8: IsVisible. Try the following code:
Note that there's a better way to do this that doesn't involve selecting the rows, but I'm having a brain freeze at the moment for the correct syntax to refer to the range object. If you know what it is, then something like:![]()
Sub Hide_Unhide() Rows("16:17").Select If Application.Range("IsVisible").Value = True Then Selection.EntireRow.Hidden = True Else Selection.EntireRow.Hidden = False End If End Sub
Range("16:17").EntireRow.Hidden = FALSE
Should do the trick without having to select. I just don't remember the proper syntax...
Bookmarks