Macro to Delete Columns

Kim B

Board Regular
Joined
Jun 16, 2008
Messages
233
Office Version
  1. 365
Hi All. I am looking for a simple macro auto fit columns and delete columns N,P,Q,R,T so leaving O,Q,S,U

It will always be those columns to delete but the trick is the data is pulled down daily so if it possible to have the macro run on each new workbook as it is pulled down

I have tried using record macro but there seems to be no option in store macro in drop down that will work with a new workbook. if I select new workbook, it's not there unless I am doing something wrong when setting up the record macro.. I was usin shortcut key r

As always thank you in advance

1714569754598.png
 
ok, as you suggested, I have posted a separate request with both requests (delete, resize) and extract to separate workbooks.

Sorry for the confusion. Thank you in advance if you happen to pick it up again. I will also mark the post that has the solution to the resize/delete request.
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
This is what I was searching for to delete columns. One questions is why does this code create a new workbook? I have a button set up to use this code.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top