Created
June 8, 2017 17:51
-
-
Save harsha547/286696cc167553bab68cbfa7a47e47b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub sbDelete_Columns_IF_Cell_Cntains_String_Text_Value() | |
Dim lColumn As Long | |
Dim iCntr As Long | |
lColumn = 20 | |
For iCntr = lColumn To 1 Step -1 | |
If Cells(1, iCntr) = “Your String” Then ‘ You can change this text | |
Columns(iCntr).Delete | |
End If | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment