View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jwang036 jwang036 is offline
external usenet poster
 
Posts: 18
Default Replace the final value (0) created by fomulas

The code works well. Thanks!

So far I only have 500 rows x 15 columns. It can grow very fast, say tens of
thousands of rows. Will checking cell by cell become very slow?

€œGord Dibben€ç¼–写:

Have you tried Autofilter to filter out anything not a "0" and clearing
contents of those cells?

Would have to be run on each column.

Or run a macro.

Sub zero_gone()
For Each cell In ActiveSheet.UsedRange
If cell.Value = 0 Then
cell.Value = ""
End If
Next
End Sub


Gord Dibben MS Excel MVP


On Thu, 23 Oct 2008 02:27:01 -0700, jwang036
wrote:

I wrote formulas something like =if(a1=0,0,1) all over a worksheet. Now I
want to empty all the cells that show "0". I used "Replace" function, but it
replaces the "0" in my formula, which causes errors.

By the way, for some complicated reasons I can't use =if(a1="","",1). I have
to find which cells should be "0", and then clear them. Thanks!