Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm desperately tring to delete a column if a cell within a range equals
"TESTING". Below gives error "Method 'Range' of Object '_Global' failed". I also need this selection to auto set to A1 to last non-blank cell on row 1. The cell coloring line works and is just there so I know I'm on the right cell. Any help in fixing these 2 actions may save a lot of gray hair. Sub testSelectDelete() Dim cell As Range For Each cell In Selection If Not IsEmpty(cell) And cell.Value = "TESTING" Then cell.Interior.Color = RGB(255, 255, 192) Range(cell).EntireColumn.Delete End If Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy column header to next column, delete & delete every nth colum | New Users to Excel | |||
Create helper column which returns a text string based on multiplecriteria. | Excel Worksheet Functions | |||
Delete a string | Excel Worksheet Functions | |||
Code help, delete rows based on column criteria | Excel Discussion (Misc queries) | |||
DELETE ROWS FROM XLS IF THE ROW CONTAINS THE STRING | Excel Discussion (Misc queries) |