I am trying to delete multiple columns in VBA for Excel. I downloaded data from the Illinois Statistical analysis center about drug arrest. http://www.icjia.org/public/sac/index.cfm?metasection=forms&metapage=rawMetadata&k=170
Each of the columns I want to delete are 3 columns apart from each other.
For example:
Adams County Illinois Champaign County Illinois Estimate |percent | Percent Margin of Error |Estimate Margin| Estimate| Percent | Percent Margin of Error
D|E|F|G|H|I|J
I just want to delete all the columns the say Percent Margin of Error
Here is my macro:
Sub deleteCol()
Columns("H,J").Delete
End Sub
I keep getting an error:
Run-time 13: type mismatch
Any suggestions?