Hide range

  • Thread starter Thread starter Tubthumper
  • Start date Start date
T

Tubthumper

Hi
*VB Noob*
Cells Q5:Q14 contain a data validation list; 'BLANK,1,2,3,4,5,6'
I want to hide cells A5:A14 if the corresponding selection from Q is BLANK
(the actual word, not a 'no entry'!) Choosing any of the numbers will have
no effect.

Thanks
 
Option Explicit

'Assumung your data validation list
'Dropdown is in cell A1

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.ScreenUpdating = False
If Range("A1").Value = "Blank" Then
Range("A5:A14").EntireRow.Hidden = True
Else
Range("A5:A14").EntireRow.Hidden = False
End If
Application.ScreenUpdating = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top