View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Macro That Deletes Columns

try
Range("b1, d1, g1").EntireColumn.Delete
--
Don Guillett
SalesAid Software

"Lilbit" wrote in message
lkaboutsoftware.com...
I tried to record a macro that allows me to delete columns I don't need in
a report that I regularly generate from a program. Some of the columns
are noncontiguous. Everytime I record the macro, choose the columns to be
deleted, and go to Edit, Delete, I get the message, “That command cannot
be
used with selections that contain entire row or columns, and also other
cells. Try selecting only entire row, entire columns, or just groups of
cells.” Is there a way around this? Thanks!!