Hi all,
Here is some code that I am using to hide columns in my sheet labeled as "Finished". I have a button copy and paste data into my "Finished" sheet, but these hidden columns keep on appearing when they aren't suppose to. The columns are hidden, because they do not apply to what is being pasted, yet. Can anyone help me figure this out or help me write a new code? Thanks in advance!
Code:
If Not Intersect(Target, Range("D18:D25")) Is Nothing Then
If Application.CountIf(Range("D18:D25"), "Dog") > 0 Then
Columns("N:W").EntireColumn.Hidden = False
Else
Columns("N:W").EntireColumn.Hidden = True
End If
End If
Here is some code that I am using to hide columns in my sheet labeled as "Finished". I have a button copy and paste data into my "Finished" sheet, but these hidden columns keep on appearing when they aren't suppose to. The columns are hidden, because they do not apply to what is being pasted, yet. Can anyone help me figure this out or help me write a new code? Thanks in advance!
Code:
If Not Intersect(Target, Range("D18:D25")) Is Nothing Then
If Application.CountIf(Range("D18:D25"), "Dog") > 0 Then
Columns("N:W").EntireColumn.Hidden = False
Else
Columns("N:W").EntireColumn.Hidden = True
End If
End If