I have the below code to hide a chart when there is no value in A1. The problem I have is A1 is actually a formula =IF(Sheet1!a2<>"",Sheet1!a2,"")
so it does not work when A1 is "blank". I need the chart to be hidden when the formula generates a blank and visible when the formula generates a value (sheet1 a2).
FYI i have 20 charts with 20 corresponding cells!
Can anyone help me fix the code?
![]()
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Range("A1"), Target) Is Nothing Then Me.ChartObjects("Chart 1").Visible = Range("A1").Value <> "" End If End Sub
Bookmarks