Clear Sheet except first 3 columns

Ploom

New Member
Joined
Feb 28, 2016
Messages
28
Hi!
I would like to clear the contents of my sheets except the first 3 columns
I tried
Sub cal_return()
Sheets("Stock Data").Select
Columns("3:" & Columns.Count).ClearContents

However it returns me Error 1004, I don't understand
Btw i'm using Office 2013

Do you have any suggestions
Thanks!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Ken Cowen

Board Regular
Joined
Jan 18, 2015
Messages
217
Not sure why yours doesn't work, but this works for me

Cells(1, 1).Offset(0, 3).Resize(1, Columns.Count - 3).EntireColumn.ClearContents

It should also function on older versions.

I hope this helps.

Ken
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,282
Messages
5,836,390
Members
430,425
Latest member
xlsee

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
Top