Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Column Based on Partial Text Match in Header
Hi, found this macro on this newsgroup. Sorry, forgot to copy person's name.
How do I convert this so it matches partial text? I tried "*City1*" etc, but didn't work. Thanks very much! Stevec Public Sub Tester003() Dim Col As Range Dim arrCities As Variant arrCities = Array("City1", "City2", "City3", "City4", "City5") For Each Col In ActiveSheet.UsedRange.Columns If IsError(Application.Match _ (Col.Cells(1).Value, arrCities, 0)) Then Col.Hidden = True End If Next Col End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find partial match from column A,B and fill partial match in C? | Excel Discussion (Misc queries) | |||
Vlookup using a partial text match | Excel Worksheet Functions | |||
Macro to hide column based on header name | Excel Programming | |||
sumif based on partial match | Excel Worksheet Functions | |||
macro to hide column based on header | Excel Programming |