Column Hide and Unhide

Private Sub Worksheet_Change(ByVal Target As Range)

Application.ScreenUpdating = False

For a = 7 To 11

For b = 2 To 3

If Worksheets(“sheet1”).Cells(3, a).Value = Worksheets(“sheet1”).Cells(3, b).Value Then

Worksheets(“sheet1”).Columns(a).Hidden = True


Worksheets(“sheet1”).Columns(a).Hidden = Flase

End If



End Sub



” this code not work sucsesfully . i want that two column hide but hide only one column. pls solve the problem cordially.

By: abdus samad

Leave a Reply

Your email address will not be published. Required fields are marked *