Need to edge out the competition for your dream job? Train for certifications today.
Dim LastC As Long
Dim Counter As Long
Application.ScreenUpdating = False
LastC = .Cells(1, .Columns.Count).End(xlToLeft).Column
.Range(.Cells(1, LastC + 1), .Cells(1, .Columns.Count)).EntireColumn.Hidden = True
For Counter = 1 To LastC
'if you meant "hide where cell <> 1" then use:
.Cells(1, Counter).EntireColumn.Hidden = (.Cells(1, Counter) <> 1)
' if you meant "hide where cell does not contain 1" then use:
'.Cells(1, Counter).EntireColumn.Hidden = (Not .Cells(1, Counter) Like "*1*")
Application.ScreenUpdating = True
Open in new window
The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.
One of a set of tools we're offering as a way of saying thank you for being a part of the community.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
This course teaches how to install and configure Windows Server 2012 R2. It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).