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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

eliW

Well-known Member
Joined
Mar 2, 2002
Messages
1,934
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,029
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
58,954
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
 

Forum statistics

Threads
1,141,155
Messages
5,704,618
Members
421,360
Latest member
Rhodia

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
Top