Solved

Removing formatting around cells after delete

Posted on 2014-09-04
3
76 Views
Last Modified: 2014-09-05
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'
0
Comment
Question by:morinia
  • 2
3 Comments
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40304968
Use the "Clear All" command:
Clear All - menu
In VBA:
Selection.Clear

Open in new window


Regards,
-Glenn
0
 

Author Comment

by:morinia
ID: 40304987
GLEN,

If I have this command to delete the row

 Rows(i).Delete

How would I code Selection.Clear  as you have above
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40305108
As so:
Rows(i).Clear

The equivalent of the [Delete] command that removes cell contents only is:
Rows(i).ClearContents
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now