Delete formula when there is empty space.....

Status
Not open for further replies.

ru_1985

New Member
Joined
Oct 4, 2006
Messages
35
HI all,

how to delete away the formula that is assign to the cell When the cell is EMPTY????

for Example: formula is asgin to Columns("C5:C35") to Columns("K5:K35") if there is any empty space in any columns. The formula MUST be delete away automatic .

So that the graph, will not have any point appointed to zero. instead it should left a blank in the graph...

Code:
  Range("C5").Select
    ActiveCell.FormulaR1C1 = _
        "=IF(INDEX('AML101-ETCH'!R[-4]C[-1]:R[30]C[-1],MATCH('POLY ETCH CD DATA'!RC[-1],'AML101-ETCH'!R[-4]C[-2]:R[30]C[-2],1))=0,"""",INDEX('AML101-ETCH'!R[-4]C[-1]:R[30]C[-1],MATCH('POLY ETCH CD DATA'!RC[-1],'AML101-ETCH'!R[-4]C[-2]:R[30]C[-2],1)))"
    Range("C5").Select
    Selection.AutoFill Destination:=Range("C5:C35"), Type:=xlFillDefault
    Range("C5:C35").Select
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Status
Not open for further replies.

Forum statistics

Threads
1,136,260
Messages
5,674,695
Members
419,520
Latest member
Jennifer4Dillon

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