How to clear contents of a cell without removing the formula

  • Thread starter Thread starter djh
  • Start date Start date
I don't believe you can clear contents without deleting the formula. Because
clearing contents is exactly that, clearing contents. You will have to get a
little creative to do this.

1.) You can write code to change the text color to match the interior color
of the cell, thus it would hide the cell value.

2.) You could embed your formula in a IF formula. For example, you could
put this forumla into a cell "=IF(C1=TRUE,SUM(A1:A10),"")". This formula
will make the cell appear blank if C1 doesn't have the word "TRUE" in it.

Are you wanting to do this for all formulas in a worksheet, workbook, or
some sheets?

When do you want to "clear contents"? When a user prints, opens the workbook?

Hope this helps! If so, let me know, click 'YES" below.
 
Not possible
You could replace Your_formula with something like:
=IF(A1="","",your_formula)
Then the cell will display nothing if A1 is empty
best wishes
 
Clear the precedents cell(s)

i.e. formula in B1 is =SUM(A1:A10)

Clear A1:A10


Gord Dibben MS Excel MVP
 
Assuming, of course, that the precedents cells do not have formulas of their
own in them.
 
What I'd like to do, is very similar.... What I need to do is...

I have a range of cells (On two different columns,) that all reference the
cell above them, and sum,1 with the exception of one cell... the top, which
references a numerical list starting at the beginning of IT's range... Now
the thing I have it do now is simply fill the area I have with the numerical
sequence. What I'd like to do, is have the cells reference another cell... m1
technically, and have that be the terminus. Like... Say I have a range of
360-475, currently my spreadsheet will number the rows starting at 360 and
going til I've run out of room in the spreadsheet (Obviously I didn't keep
entering the formula of =SUM(Cell_Prior,1) (I wish I could use "Cell_Prior"
as a command... That would be awesome... Anyway...)

So If I do have the 475 as a terminus, I'm trying to find a way to make it
so there's a generic formula that I don't have to modify to be tailored to
each cell, that I can just toss into their formulae. Something like...
=IF(SUM>M1, " ")

But I'm not sure how to word the argument, exactly. And there's another one
I kinda need to do... I don't suppose there is an easy way to tell a cell to
reference the cell directly to it's right? And then say =IF(CELL_TO_RIGHT=, "
" , " ") Because I also have a cell next to the numerical cells that have a
three letter system to depict which group the range of numbers belongs to.
And I would like to blank it out too.
 
Back
Top