Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Is there is a function that I could use , where if a cell is equal to
Day1, it would show me an already created chart and if B1 is not "Day1" hide that chart? Any help is appreciated! |
#2
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
You need to use VBA. If you just wanted to show an empty chart you could do
it with a formula but if you want to hide the chart altogether you will need to use VBA. Is VBA an acceptable solutions? -- Thanks, Shane Devenshire " wrote: Is there is a function that I could use , where if a cell is equal to Day1, it would show me an already created chart and if B1 is not "Day1" hide that chart? Any help is appreciated! |
#4
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
You can do this with named ranges and a linked picture. There's a sample
file he http://www.contextures.com/excelfiles.html Under Charts, look for 'CH0002 - Show or Hide Chart' wrote: Is there is a function that I could use , where if a cell is equal to Day1, it would show me an already created chart and if B1 is not "Day1" hide that chart? -- Debra Dalgleish Contextures http://www.contextures.com/tiptech.html |
#5
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Hi,
With Debra Dalgleish method, which is one of the suggestions which I mentioned in my first email, does not really hide the chart. It still exists as an object on the screen. So it can still be selected, deleted or moved. And as done in the example, it can still be seen. The sample provide by François L, which was my other suggestion, fails not because the idea is incorrect, but simply because the chart name is "Chart 1" not "Graphique 1". You can use the following code: Private Sub Worksheet_Change(ByVal Target As Range) If [PickList] = "Day1" Then ChartObjects("Chart 1").Visible = False Else ChartObjects("Chart 1").Visible = True End If End Sub Here PickList is the range name of the cell where you enter your Day value. You can use a Data, Validation drop down list or you can just type the day into the cell. The Data Validation method is safer because if you type Day 1 it will not work because the spelling doesn't match Day1. Very interesting that my two suggestions both generated a new web page on the internet showing my solutions, both with files dated 1/21/2007! -- Cheers, Shane Devenshire Microsoft Excel MVP "Debra Dalgleish" wrote: You can do this with named ranges and a linked picture. There's a sample file he http://www.contextures.com/excelfiles.html Under Charts, look for 'CH0002 - Show or Hide Chart' wrote: Is there is a function that I could use , where if a cell is equal to Day1, it would show me an already created chart and if B1 is not "Day1" hide that chart? -- Debra Dalgleish Contextures http://www.contextures.com/tiptech.html |
#6
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Francis created a file from your idea, even though you hadn't posted it
yet? And since you had posted "you could do it with a formula", you assume my solution was based on your suggestion? Interesting. ShaneDevenshire wrote: Hi, With Debra Dalgleish method, which is one of the suggestions which I mentioned in my first email, does not really hide the chart. It still exists as an object on the screen. So it can still be selected, deleted or moved. And as done in the example, it can still be seen. The sample provide by François L, which was my other suggestion, fails not because the idea is incorrect, but simply because the chart name is "Chart 1" not "Graphique 1". You can use the following code: Private Sub Worksheet_Change(ByVal Target As Range) If [PickList] = "Day1" Then ChartObjects("Chart 1").Visible = False Else ChartObjects("Chart 1").Visible = True End If End Sub Here PickList is the range name of the cell where you enter your Day value. You can use a Data, Validation drop down list or you can just type the day into the cell. The Data Validation method is safer because if you type Day 1 it will not work because the spelling doesn't match Day1. Very interesting that my two suggestions both generated a new web page on the internet showing my solutions, both with files dated 1/21/2007! -- Debra Dalgleish Contextures http://www.contextures.com/tiptech.html |
#7
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
ShaneDevenshire a écrit :
The sample provide by François L, which was my other suggestion, fails not because the idea is incorrect, but simply because the chart name is "Chart 1" not "Graphique 1". You can use the following code: Private Sub Worksheet_Change(ByVal Target As Range) If [PickList] = "Day1" Then ChartObjects("Chart 1").Visible = False Else ChartObjects("Chart 1").Visible = True End If End Sub (...) Very interesting that my two suggestions both generated a new web page on the internet showing my solutions, both with files dated 1/21/2007! Hi, My sample "fails" just because it was made with a french version of XL and in an english version XL translate Graphique as Chart. A workaround is simply to rename the Chartobjects. For your information, this sample is on the site www.excelabo.net since 2005, see http://www.excelabo.net/moteurs/comp...=fl-cachegraph -- François L |
#8
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Thank you guys for all your help! this works..!!!
On Jan 21, 4:28 pm, Francois L wrote: ShaneDevenshire a écrit : The sample provide by François L, which was my other suggestion, fails not because the idea is incorrect, but simply because thechartname is "Chart1" not "Graphique 1". You can use the following code: Private Sub Worksheet_Change(ByVal Target As Range) If[PickList] = "Day1" Then ChartObjects("Chart1").Visible = False Else ChartObjects("Chart1").Visible = True EndIf End Sub (...) Very interesting that my two suggestions both generated a new web page on the internet showing my solutions, both with files dated 1/21/2007!Hi, My sample "fails" just because it was made with a french version of XL and in an english version XL translate Graphique asChart. A workaround is simply to rename the Chartobjects. For your information, this sample is on the sitewww.excelabo.netsince 2005, seehttp://www.excelabo.net/moteurs/compteclic.php?nom=fl-cachegraph -- François L- Hide quoted text --Showquoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using an offset formula for the reference in a relative reference | Excel Worksheet Functions | |||
Data does not show on a chart | Charts and Charting in Excel | |||
Help with this conditional IF statement | Excel Discussion (Misc queries) | |||
Custom functions calculating time arguments Help Desperate | Excel Worksheet Functions | |||
Display cell value on a chart. | Charts and Charting in Excel |