ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   =IF(B3<O;nodisplay(graphA);display(graphA)) (https://www.excelbanter.com/excel-programming/331924-%3Dif-b3-o%3Bnodisplay-grapha-%3Bdisplay-grapha.html)

Thierry[_4_]

=IF(B3<O;nodisplay(graphA);display(graphA))
 
Hello,
I have a sheet with numbers and graphs.
If the number of the cell B3 is lower than zero, I wish that
Graph A, do not display.
Is it possible to manage this ?
What is fonction to use and how can I give a name for my graph.
Thanks for any help.
Thierry.

PS : I have a frensh version of Excel 2002



Ron Coderre[_2_]

=IF(B3<O;nodisplay(graphA);display(graphA))
 
First, you can manually name a chart by:
1)Select a cell on the same sheet as the chart
2)Hold the [Ctrl] key and select the chart
The name box in the upper left will display the current chart name (Chart1,
etc).

3)In that name box, type the new name for the chart (example: myChart).

Next, hiding the chart if Cell B3 is less than zero:
Try this code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("B3") < 0 Then
ActiveSheet.ChartObjects("myChart").Visible = False
Else
ActiveSheet.ChartObjects("myChart").Visible = True
End If

End Sub

Does that help?

Regards,
Ron





All times are GMT +1. The time now is 10:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com