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!
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Ken Cowen

Board Regular
Joined
Jan 18, 2015
Messages
213
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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,489
Messages
5,601,982
Members
414,489
Latest member
Xlambda

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