Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Clear contents of cells with an empty string

Posted on 2011-09-22
2
Medium Priority
?
163 Views
Last Modified: 2012-05-12
Dear Experts:

I would like to CLEAR the CONTENTS of all the cells in colum 'F' where the entered formula has produced an empty string "".

Help is much appreciated. Thank you very much in advance.

Regards, Andreas

0
Comment
Question by:AndreasHermle
2 Comments
 
LVL 24

Accepted Solution

by:
StephenJR earned 2000 total points
ID: 36579148
This perhaps?
Sub x()

Dim r As Range

For Each r In Columns(6).SpecialCells(xlCellTypeFormulas)
    If r.Value = "" Then r.Clearcontents
Next r

End Sub

Open in new window

0
 

Author Closing Comment

by:AndreasHermle
ID: 36579225
Hi Stephen,

that's it. Thank you very much for your help.

Regards, Andreas
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

963 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