Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Entire Column
Hi all, I am trying to delete EntireColumn of Range("I9:BF9") where
cell value in that range is "X". I tried doing it with below code but I its not deleting all the columns. I think I might need to put something where it say "i" in line "If Cells(9, i).Value = "X" Then" and "Cells(9, i).EntireColumn.Delete". But I cant work it out. Please can any friend can help me on this Code I am using************ Sub DelCol() For i = Range("I9:BF9").Columns.Count To 1 Step -1 If Cells(9, i).Value = "X" Then Cells(9, i).EntireColumn.Delete End If Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need to delete last value in column but not delete entire row | Excel Programming | |||
CANNOT DELETE AN ENTIRE COLUMN | Excel Discussion (Misc queries) | |||
Find Column heading and then Delete entire column | Excel Programming | |||
Entire Column Delete | Excel Programming | |||
Delete Entire Row If Column C is Blank | Excel Programming |