Hi jraj1106
Thanks for your kind reply. I need a macro that looks for all the column and deletes the whole column which has single digit number which over here is 0 and 1. In the excel file that I have uploaded I want to get rid of columns B and C. But the macro should not effect columns A, D and E because column D and E have single digit number which is 0. Hope I explained it well.
I have a code which does it for the rows. But deletes all the content.
Dim nLastRow As Long, i As Long
Sheets("Stats Table").Select
' Find Last Row in Column "C"
nLastRow = Cells(Rows.Count, "C").End(xlUp).Row
' Step backwards because of deleting rows
For i = nLastRow To 1 Step -1
' If the item in row C has only 1 character in it, delete row
If Len(Cells(i, "C")) = 1 Then
Rows(i).Delete
End If
Next i
Cheers
plasma33
Bookmarks