Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 23
Default If cell B1 = "Day1" , show chart

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!

  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,344
Default If cell B1 = "Day1" , show chart

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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,979
Default If cell B1 = "Day1" , show chart

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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,344
Default If cell B1 = "Day1" , show chart

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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,979
Default If cell B1 = "Day1" , show chart

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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 3
Default If cell B1 = "Day1" , show chart

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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 23
Default If cell B1 = "Day1" , show chart

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 05:12 PM
Data does not show on a chart Cherisse Charts and Charting in Excel 1 July 24th 06 09:46 PM
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Display cell value on a chart. Andrew Constantinidis Charts and Charting in Excel 1 January 8th 05 04:36 AM


All times are GMT +1. The time now is 05:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"