clear cell contents with vba

asdfasdf

New Member
Joined
Aug 19, 2009
Messages
9
I'm wondering how to clear contents in rows that have any cells that are not empty with vba from a certain row onwards.
So from row 52 i want to clear all contents of any cells.
everytime i do this my computer seems to crash, obviously haven't quite got the code right.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Could you put up your code so far?

Is it always row 52 onwards? How far, does it change?

And is it all rows after 52 basically? You say rows that have some empty cells, are there any exceptions?
 
Upvote 0
Sorry i deleted all my attempts cause they didn't work! Ithink this is th elast one I tried, but it froze my computer. I always want to clear contents or delete rows (anything to make the cells blank) from row 52 onwards

Rows("52:52").Select
Selection.ClearContents

thanks!
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,144
Members
448,552
Latest member
WORKINGWITHNOLEADER

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