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)))
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi,

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

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

HTH

Eli
 
Upvote 0
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)))
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,624
Messages
6,120,591
Members
448,973
Latest member
ksonnia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top