How to delete away the formula, if the cell is blank??

ru_1985

New Member
Joined
Oct 4, 2006
Messages
35
HI ALL.

How can i delete away the formula, when the is no value in it?
Or is there anyway to delete away e ZERO in the graph... so tat the line graph will not shown ZERO and it will left a blank...

Code:
=IF(INDEX('AML101-ETCH'!B13:B47,MATCH('POLY ETCH CD DATA'!B17,'AML101-ETCH'!A13:A47,1))=0,"",INDEX('AML101-ETCH'!B13:B47,MATCH('POLY ETCH CD DATA'!B17,'AML101-ETCH'!A13:A47,1)))
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

eliW

Well-known Member
Joined
Mar 2, 2002
Messages
1,931
Hi,

Try to replace the "" in your formula with NA()

This will be interpreted in the graph as "no data"

HTH

Eli
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,021
Re: How to get rid of the zero value in the line chart?

As has been pointed out, you need to use NA() instead of "". But, if you decide to use 2 cells instead of trying to squeeze everything into 1 cell, you can also improve the performance and maintainability of your workbook. In one cell, put the INDEX function. In the adjacent cell, put =IF({cell-with-index}=0,NA((),{cell-with-index}). Plot the 2nd cell (i.e., the one with the IF).

Now, you no longer duplicate the INDEX().

HI ALL.

How can i delete away the formula, when the is no value in it?
Or is there anyway to delete away e ZERO in the graph... so tat the line graph will not shown ZERO and it will left a blank...

Code:
=IF(INDEX('AML101-ETCH'!B13:B47,MATCH('POLY ETCH CD DATA'!B17,'AML101-ETCH'!A13:A47,1))=0,"",INDEX('AML101-ETCH'!B13:B47,MATCH('POLY ETCH CD DATA'!B17,'AML101-ETCH'!A13:A47,1)))
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,816
Office Version
  1. 365
Platform
  1. Windows
I think you may require a macro, something like this that will delete the formula:
Code:
Sub MyDeleteFormula()

    Dim myRange As Range
    Dim myCell As Range
    
'   Set range to check
    Set myRange = Range("A1:A10")
    
'   Loop through each cell in range and delete contents if value is blank
    For Each myCell In myRange
        If myCell.Value = "" Or myCell.Value = 0 Then myCell.ClearContents
    Next myCell
        
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,111,596
Messages
5,541,150
Members
410,543
Latest member
ExcelGlenn
Top