Solved

Removing formatting around cells after delete

Posted on 2014-09-04
3
85 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

752 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