Clear the content of a cell

Y

Yee

Is there a function in Excel that would clear the content
of a cell(even if that cell contains a formula itself)
when the reference cell contains a specified character?
Hope understand what I mean?
 
K

Ken Wright

No, you would need VBA to do that. You can have a formula return "" which for
most functions that refer to that cell or a range including that cell, eg
=SUM(Rng) would have the same effect as if it were empty, but it will not be
truly empty in the real sense of the word.
 
Y

Yee

Ken., thx..
how do i write VBA that, i guess it should n't be too
difficult!! right??
 
B

Bob Phillips

Selection.ClearContents

leaves the formatting

Selection.Clear

doesn't

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top