Chart
Posted by rosie on February 28, 2001 2:07 PM
I am trying to delete the contents of cells to keep a chart line from going to zero if a cell is emptied by a formula.
=IF(B2="",IF(B2="",D2,""),IF(SUM(B2:B3)=B2,B2,""))
I tried the clear contents code I found posted, but maybe I did it wrong.
Private Sub CommandButton1_Click()
Range("A2").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Range("D1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Range("C2").Select
If Range("C2") = "<1" Then Range("C2").ClearContents
:: End Sub