Clear Column Contents

adamsm

Active Member
Joined
Apr 20, 2010
Messages
444
Hi,

How could I write a code that would delete the column contents from C11:N101 and hide rows 103 to 123 ?

Any help on this would be kindly appreciated.

Thanks in advance.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Thanks for the reply. The code clears the values. But in doing so it even clears the lines that I have placed in rows. How could the code be made so that it only clears the data values but not the line?

Thanks in advance.
 
Upvote 0
If you want to keep formats change the .Clear to .ClearContents
Code:
Sub DoStuff()
     Range("C11:N101").Clear
     Rows("103:123").Hidden = True
End Sub
 
Upvote 0
Thanks for the help. How could this code further be made so that it un hides rows from 11:101?
 
Upvote 0
Just a quick alteration of the hide line to switch it around:


Rows("11:101").Hidden = False
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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