Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Create graph if value is greater that zero

Hi....

How can I create a "conditional" graph. Meaning...I have ten things that I
track each week and I would like a graph to automatically create itself as
long as the value is greater than zero. I understand that I can possibly
achieve this using a Macro but I do not have the faintest idea how to start.

Any help would be fantastic. Cheers!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Create graph if value is greater that zero

Hi,

First of all, you can use the Macro Recorder to generate the code
producing your chart. Before going through the steps of creating the
chart, ToolsMacroRecord new macro...

After specifying the macro name a toolbox comes up with the record and
stop buttons. Stop after you have created the chart to your liking and
have moved it exactly where you want it.

Second, the following VBA Event Procedure will run automatically if a
change in A1 is detected:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Value = xxxx
'..............
End If
End If
End Sub

In the place of the ........... you can paste the code generated by
the macro recorder. Change the cell (leave the $$) in the 2nd line of
the above code to your desired one. Change the xxxx with the value you
want in order for the chart to show.

This is a special type of a macro and it must be located in the code
module of the sheet you want this to happen. Right click the sheet
tab, choose View Code... and then the VBA IDE will come up. You can
paste the code in the window and then copy and paste from Module1,
which will have been created by the recorder.

Good luck!
Kostis Vezerides

musicgirl wrote:
Hi....

How can I create a "conditional" graph. Meaning...I have ten things that I
track each week and I would like a graph to automatically create itself as
long as the value is greater than zero. I understand that I can possibly
achieve this using a Macro but I do not have the faintest idea how to start.

Any help would be fantastic. Cheers!


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
How do I Create a formula for greater or lesserthen Put PPT to bed New Users to Excel 1 October 5th 06 10:09 PM
How do I create an xyy graph? Le Charts and Charting in Excel 1 April 20th 06 05:20 PM
How do I create a 4 D graph? Sid Charts and Charting in Excel 1 April 20th 06 01:18 AM
How do I create my own graph? gingergoat22 Charts and Charting in Excel 1 April 17th 06 11:52 AM
How do i create callouts for a graph? miami7680 New Users to Excel 2 April 23rd 05 11:11 AM


All times are GMT +1. The time now is 03:24 AM.

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"