Removing formatting around cells after delete

Experts,

I have a spreadsheet that I am deleting rows if the value of all the columns is zero.  Column "C" on the spreadsheet has a value and the value is being deleted but the formatting around the cell (all four borders) remains.   Everything else on the row is deleted.

How can I delete the formatting in column "C'
moriniaAdvanced Analytics AnalystAsked:
Who is Participating?
 
Glenn RayExcel VBA DeveloperCommented:
As so:
Rows(i).Clear

The equivalent of the [Delete] command that removes cell contents only is:
Rows(i).ClearContents
0
 
Glenn RayExcel VBA DeveloperCommented:
Use the "Clear All" command:
Clear All - menu
In VBA:
Selection.Clear

Open in new window


Regards,
-Glenn
0
 
moriniaAdvanced Analytics AnalystAuthor Commented:
GLEN,

If I have this command to delete the row

 Rows(i).Delete

How would I code Selection.Clear  as you have above
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.