Syedali Active Member Jan 22, 2019 #1 Hi Friends, I need a macro to hide column which is contain Particular text like "syed". Attached file for reference. Attachments Book23.xlsx 8.6 KB · Views: 3
Hi Friends, I need a macro to hide column which is contain Particular text like "syed". Attached file for reference.
p45cal Well-Known Member Jan 22, 2019 #2 Code: Sub Macro1() For Each cll In Range("A5:G5").Cells If InStr(cll.Value, "syed") > 0 Then cll.EntireColumn.Hidden = True Next cll End Sub
Code: Sub Macro1() For Each cll In Range("A5:G5").Cells If InStr(cll.Value, "syed") > 0 Then cll.EntireColumn.Hidden = True Next cll End Sub