How do you clear the contents of a cell but keep the formula? Also, how do I
program that if answer is 0 then leave cell blank instead of putting in the
zeros? Thank you
How do you clear the contents of a cell but keep the formula? Also, how do I
program that if answer is 0 then leave cell blank instead of putting in the
zeros? Thank you
You don't. The formula produces a result and that is what is displayed.
You could possibly change all the font colors to match the background color
or you could adjust all your formulas to do something like this
=if(A1<>"",currentformula,"")
then if you cleared A1, all cells would look blank.
You could use a similar construct to appear blank if the formula returns a
zero.
=if(A1<>"",if(currentformula=0,"",currentformula),"")
--
Regards,
Tom Ogilvy
"Flopp2" <[email protected]> wrote in message
news:[email protected]...
> How do you clear the contents of a cell but keep the formula? Also, how
do I
> program that if answer is 0 then leave cell blank instead of putting in
the
> zeros? Thank you
Maybe I have been asking the wrong question as you have offered me plenty of
help. "vba code doesn't work". What this guy is asking is kind of what I
want to do. I have cell references to another worksheet which if there is no
data then it displays 0. Your idea of changing the background color to match
fonts or visa versa might be the ticket. You see the length of my worksheet
keeps changing depending of how much data is being transferred in and all I
basically wanted to do is clean up the cosmetics of the worksheet. Is this
your suggestion for me?
"Tom Ogilvy" wrote:
> You don't. The formula produces a result and that is what is displayed.
> You could possibly change all the font colors to match the background color
> or you could adjust all your formulas to do something like this
>
> =if(A1<>"",currentformula,"")
>
> then if you cleared A1, all cells would look blank.
>
> You could use a similar construct to appear blank if the formula returns a
> zero.
>
> =if(A1<>"",if(currentformula=0,"",currentformula),"")
>
>
> --
> Regards,
> Tom Ogilvy
>
> "Flopp2" <[email protected]> wrote in message
> news:[email protected]...
> > How do you clear the contents of a cell but keep the formula? Also, how
> do I
> > program that if answer is 0 then leave cell blank instead of putting in
> the
> > zeros? Thank you
>
>
>
for the zero appears blank question, a better approach might be to do
Tools=>Options=>View and uncheck Zero Values.
--
Regards,
Tom Ogilvy
"Flopp2" <[email protected]> wrote in message
news:[email protected]...
> How do you clear the contents of a cell but keep the formula? Also, how
do I
> program that if answer is 0 then leave cell blank instead of putting in
the
> zeros? Thank you
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks