Hi,
This is my first post and I'm a vba rookie, so please be gentle.
What I'm trying to do:
If any of the cells in range B3:B45 contains a one specific type of document (" customised"), which user can choose from droplist , the column C is unhiding. If " customised " wasn't chosen, the column stays hidden.
I' ve tried the following:
Sub ifloop
Dim rcell As Range, rng As Range
Set ring = Thisworkbook.Worksheets("Sheet1").Range("B3:B45")
For Each rcell In rng.Cells
If rcell.Value="customised" Then
Columns("C").Entirecolumn.Hidden= False
End if
Next rcell
End sub
But firstly it works only when I press Run sub, and secondly it should hide column C if answer was changed from customised to standard, resulting in no " customised" answer in cell range
Help
This is my first post and I'm a vba rookie, so please be gentle.
What I'm trying to do:
If any of the cells in range B3:B45 contains a one specific type of document (" customised"), which user can choose from droplist , the column C is unhiding. If " customised " wasn't chosen, the column stays hidden.
I' ve tried the following:
Sub ifloop
Dim rcell As Range, rng As Range
Set ring = Thisworkbook.Worksheets("Sheet1").Range("B3:B45")
For Each rcell In rng.Cells
If rcell.Value="customised" Then
Columns("C").Entirecolumn.Hidden= False
End if
Next rcell
End sub
But firstly it works only when I press Run sub, and secondly it should hide column C if answer was changed from customised to standard, resulting in no " customised" answer in cell range
Help