A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Try:
Dim c As Control
For Each Cell In Range("B5:B22")
'First, reset all the controls to not visible
'Use logic like this if there are specific controls to hide
'For example, all the labels whose names start with lbl
For Each c In Me.Controls
If c.Name Like "lbl*" Then c.Visible = False
Next c
'Use logic like this to hide all controls
' For Each c In Me.Controls
' c.Visible = False
' Next c
If Cell.Value <> "" Then
Me.Controls(Cell.Offset(0, -1).Value).Visible = True
Me.Controls(Cell.Offset(0, 1).Value).Visible = True
Me.Controls(Cell.Offset(0, 3).Value).Visible = True
End If
Next Cell