Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 205
Default Charts return zero?

Hi!

in Sheet2:

B1=IF(COLUMNS($A:A)COUNT(Sheet1!$D:$D),"",INDEX(S heet1!$B:$B,SMALL(Sheet1!$D:$D,COLUMNS($A:A))))
-copy accross 40 columns

A2=IF(ROWS($1:1)COUNT(Sheet1!C:C),"",INDEX(Sheet1 !A:A,SMALL(Sheet1!C:C,ROWS($1:1))))
-copy accross 40 rows

B2=IF(OR(B$1="",$A2=""),"",SUMPRODUCT((Sheet1!$A$1 :$A$100=$A2)*(Sheet1!$B$1:$B$100=B$1)))
-copy accross 40rows*40columns

based on the function above,it will create a table of data where i will
create a chart from it.i define 2 offset to create the chart:

CUST=OFFSET(Sheet2!$A$1,0,0,COUNTA(Sheet2!$A:$A),1 )
MOD=OFFSET(Sheet2!$B$2,0,0,1,COUNTA(Sheet2!$2:$2))

for now the chart has 25R*24C,therefore when i ceate the chart,it is based
on 40R*40C,included the row and column with no data.is it because of the
function in the cell?
i copy the function to 40R*40C as a space for new data since the table would
expand rows and column time by time.
the problem right now is i want the chart include the available data only..i
dont want it to include the zero data.is it possible?is yes,how?

thanks in advanced!

--
Regards,
Linda
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Charts return zero?

Linda -

Here is what I posted in response to a similar question last month:

Using dynamic ranges, you can create a chart whose series grow and shrink as
the range becomes longer and shorter. But you can't use dynamic ranges to
vary the number of series in the chart. That would require some VBA.

Assuming the data starts in cell A1, you could define a name that includes
the rows and columns up to the errors. Go to Insert menu Name Define:

Name: ChartDataRange
Refers To:
=offset($A$1,0,0,COUNTA($A$1:$A$36)-SUM(IF(ISNA($A$1:$A$36),1,0)),COUNT($1:$1)+1)

I arbitrarily chose A1:A36; pick a range long enough to get all the values
you may ever need.

Update the data, then run this macro:

Sub UpdateChart()
ActiveSheet.ChartObjects(1).Chart.SetSourceData _
Source:=ActiveSheet.Range("ChartDataRange"), _
PlotBy:=xlRows
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______

"linda" wrote in message
...
i've gone through all the post and others link but all of the example just
for static column..just define offset for each column.but now,my table is
changing both rows & column.i cant define for each column since there may
be
column with zero data.
my table full with function not only in the value,but also in the labels
for
X & Y axis.

please someone do help me..thank you!
--
Regards,
Linda


"linda" wrote:

Hi!

in Sheet2:

B1=IF(COLUMNS($A:A)COUNT(Sheet1!$D:$D),"",INDEX(S heet1!$B:$B,SMALL(Sheet1!$D:$D,COLUMNS($A:A))))
-copy accross 40 columns

A2=IF(ROWS($1:1)COUNT(Sheet1!C:C),"",INDEX(Sheet1 !A:A,SMALL(Sheet1!C:C,ROWS($1:1))))
-copy accross 40 rows

B2=IF(OR(B$1="",$A2=""),"",SUMPRODUCT((Sheet1!$A$1 :$A$100=$A2)*(Sheet1!$B$1:$B$100=B$1)))
-copy accross 40rows*40columns

based on the function above,it will create a table of data where i will
create a chart from it.i define 2 offset to create the chart:

CUST=OFFSET(Sheet2!$A$1,0,0,COUNTA(Sheet2!$A:$A),1 )
MOD=OFFSET(Sheet2!$B$2,0,0,1,COUNTA(Sheet2!$2:$2))

for now the chart has 25R*24C,therefore when i ceate the chart,it is
based
on 40R*40C,included the row and column with no data.is it because of the
function in the cell?
i copy the function to 40R*40C as a space for new data since the table
would
expand rows and column time by time.
the problem right now is i want the chart include the available data
only..i
dont want it to include the zero data.is it possible?is yes,how?

thanks in advanced!

--
Regards,
Linda



  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 205
Default Charts return zero?

i already try that yesterday,but its still not help.my chart is still 40R*40C
eventhough the available data only 26R*25C.

--
Regards,
Linda


"Jon Peltier" wrote:

Linda -

Here is what I posted in response to a similar question last month:

Using dynamic ranges, you can create a chart whose series grow and shrink as
the range becomes longer and shorter. But you can't use dynamic ranges to
vary the number of series in the chart. That would require some VBA.

Assuming the data starts in cell A1, you could define a name that includes
the rows and columns up to the errors. Go to Insert menu Name Define:

Name: ChartDataRange
Refers To:
=offset($A$1,0,0,COUNTA($A$1:$A$36)-SUM(IF(ISNA($A$1:$A$36),1,0)),COUNT($1:$1)+1)

I arbitrarily chose A1:A36; pick a range long enough to get all the values
you may ever need.

Update the data, then run this macro:

Sub UpdateChart()
ActiveSheet.ChartObjects(1).Chart.SetSourceData _
Source:=ActiveSheet.Range("ChartDataRange"), _
PlotBy:=xlRows
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______

"linda" wrote in message
...
i've gone through all the post and others link but all of the example just
for static column..just define offset for each column.but now,my table is
changing both rows & column.i cant define for each column since there may
be
column with zero data.
my table full with function not only in the value,but also in the labels
for
X & Y axis.

please someone do help me..thank you!
--
Regards,
Linda


"linda" wrote:

Hi!

in Sheet2:

B1=IF(COLUMNS($A:A)COUNT(Sheet1!$D:$D),"",INDEX(S heet1!$B:$B,SMALL(Sheet1!$D:$D,COLUMNS($A:A))))
-copy accross 40 columns

A2=IF(ROWS($1:1)COUNT(Sheet1!C:C),"",INDEX(Sheet1 !A:A,SMALL(Sheet1!C:C,ROWS($1:1))))
-copy accross 40 rows

B2=IF(OR(B$1="",$A2=""),"",SUMPRODUCT((Sheet1!$A$1 :$A$100=$A2)*(Sheet1!$B$1:$B$100=B$1)))
-copy accross 40rows*40columns

based on the function above,it will create a table of data where i will
create a chart from it.i define 2 offset to create the chart:

CUST=OFFSET(Sheet2!$A$1,0,0,COUNTA(Sheet2!$A:$A),1 )
MOD=OFFSET(Sheet2!$B$2,0,0,1,COUNTA(Sheet2!$2:$2))

for now the chart has 25R*24C,therefore when i ceate the chart,it is
based
on 40R*40C,included the row and column with no data.is it because of the
function in the cell?
i copy the function to 40R*40C as a space for new data since the table
would
expand rows and column time by time.
the problem right now is i want the chart include the available data
only..i
dont want it to include the zero data.is it possible?is yes,how?

thanks in advanced!

--
Regards,
Linda




  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Charts return zero?

Try to incorporate your more detailed definitions of the width and height of
the plotting range into my simple name definition.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"linda" wrote in message
...
i already try that yesterday,but its still not help.my chart is still
40R*40C
eventhough the available data only 26R*25C.

--
Regards,
Linda


"Jon Peltier" wrote:

Linda -

Here is what I posted in response to a similar question last month:

Using dynamic ranges, you can create a chart whose series grow and shrink
as
the range becomes longer and shorter. But you can't use dynamic ranges to
vary the number of series in the chart. That would require some VBA.

Assuming the data starts in cell A1, you could define a name that
includes
the rows and columns up to the errors. Go to Insert menu Name Define:

Name: ChartDataRange
Refers To:
=offset($A$1,0,0,COUNTA($A$1:$A$36)-SUM(IF(ISNA($A$1:$A$36),1,0)),COUNT($1:$1)+1)

I arbitrarily chose A1:A36; pick a range long enough to get all the
values
you may ever need.

Update the data, then run this macro:

Sub UpdateChart()
ActiveSheet.ChartObjects(1).Chart.SetSourceData _
Source:=ActiveSheet.Range("ChartDataRange"), _
PlotBy:=xlRows
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______

"linda" wrote in message
...
i've gone through all the post and others link but all of the example
just
for static column..just define offset for each column.but now,my table
is
changing both rows & column.i cant define for each column since there
may
be
column with zero data.
my table full with function not only in the value,but also in the
labels
for
X & Y axis.

please someone do help me..thank you!
--
Regards,
Linda


"linda" wrote:

Hi!

in Sheet2:

B1=IF(COLUMNS($A:A)COUNT(Sheet1!$D:$D),"",INDEX(S heet1!$B:$B,SMALL(Sheet1!$D:$D,COLUMNS($A:A))))
-copy accross 40 columns

A2=IF(ROWS($1:1)COUNT(Sheet1!C:C),"",INDEX(Sheet1 !A:A,SMALL(Sheet1!C:C,ROWS($1:1))))
-copy accross 40 rows

B2=IF(OR(B$1="",$A2=""),"",SUMPRODUCT((Sheet1!$A$1 :$A$100=$A2)*(Sheet1!$B$1:$B$100=B$1)))
-copy accross 40rows*40columns

based on the function above,it will create a table of data where i
will
create a chart from it.i define 2 offset to create the chart:

CUST=OFFSET(Sheet2!$A$1,0,0,COUNTA(Sheet2!$A:$A),1 )
MOD=OFFSET(Sheet2!$B$2,0,0,1,COUNTA(Sheet2!$2:$2))

for now the chart has 25R*24C,therefore when i ceate the chart,it is
based
on 40R*40C,included the row and column with no data.is it because of
the
function in the cell?
i copy the function to 40R*40C as a space for new data since the table
would
expand rows and column time by time.
the problem right now is i want the chart include the available data
only..i
dont want it to include the zero data.is it possible?is yes,how?

thanks in advanced!

--
Regards,
Linda






  #5   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 205
Default Charts return zero?

can't understand what you mean...can you please explain me further?
--
Regards,
Linda


"Jon Peltier" wrote:

Try to incorporate your more detailed definitions of the width and height of
the plotting range into my simple name definition.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"linda" wrote in message
...
i already try that yesterday,but its still not help.my chart is still
40R*40C
eventhough the available data only 26R*25C.

--
Regards,
Linda


"Jon Peltier" wrote:

Linda -

Here is what I posted in response to a similar question last month:

Using dynamic ranges, you can create a chart whose series grow and shrink
as
the range becomes longer and shorter. But you can't use dynamic ranges to
vary the number of series in the chart. That would require some VBA.

Assuming the data starts in cell A1, you could define a name that
includes
the rows and columns up to the errors. Go to Insert menu Name Define:

Name: ChartDataRange
Refers To:
=offset($A$1,0,0,COUNTA($A$1:$A$36)-SUM(IF(ISNA($A$1:$A$36),1,0)),COUNT($1:$1)+1)

I arbitrarily chose A1:A36; pick a range long enough to get all the
values
you may ever need.

Update the data, then run this macro:

Sub UpdateChart()
ActiveSheet.ChartObjects(1).Chart.SetSourceData _
Source:=ActiveSheet.Range("ChartDataRange"), _
PlotBy:=xlRows
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______

"linda" wrote in message
...
i've gone through all the post and others link but all of the example
just
for static column..just define offset for each column.but now,my table
is
changing both rows & column.i cant define for each column since there
may
be
column with zero data.
my table full with function not only in the value,but also in the
labels
for
X & Y axis.

please someone do help me..thank you!
--
Regards,
Linda


"linda" wrote:

Hi!

in Sheet2:

B1=IF(COLUMNS($A:A)COUNT(Sheet1!$D:$D),"",INDEX(S heet1!$B:$B,SMALL(Sheet1!$D:$D,COLUMNS($A:A))))
-copy accross 40 columns

A2=IF(ROWS($1:1)COUNT(Sheet1!C:C),"",INDEX(Sheet1 !A:A,SMALL(Sheet1!C:C,ROWS($1:1))))
-copy accross 40 rows

B2=IF(OR(B$1="",$A2=""),"",SUMPRODUCT((Sheet1!$A$1 :$A$100=$A2)*(Sheet1!$B$1:$B$100=B$1)))
-copy accross 40rows*40columns

based on the function above,it will create a table of data where i
will
create a chart from it.i define 2 offset to create the chart:

CUST=OFFSET(Sheet2!$A$1,0,0,COUNTA(Sheet2!$A:$A),1 )
MOD=OFFSET(Sheet2!$B$2,0,0,1,COUNTA(Sheet2!$2:$2))

for now the chart has 25R*24C,therefore when i ceate the chart,it is
based
on 40R*40C,included the row and column with no data.is it because of
the
function in the cell?
i copy the function to 40R*40C as a space for new data since the table
would
expand rows and column time by time.
the problem right now is i want the chart include the available data
only..i
dont want it to include the zero data.is it possible?is yes,how?

thanks in advanced!

--
Regards,
Linda








  #6   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default Charts return zero?

I gave an example with a simple definition of my dynamic range. You had a
more complicated definition which presumably accounted for the
characteristics of your data range. I am suggesting you use your name
definitions with the VBA approach to changing the chart's source data range.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"linda" wrote in message
...
can't understand what you mean...can you please explain me further?
--
Regards,
Linda


"Jon Peltier" wrote:

Try to incorporate your more detailed definitions of the width and height
of
the plotting range into my simple name definition.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"linda" wrote in message
...
i already try that yesterday,but its still not help.my chart is still
40R*40C
eventhough the available data only 26R*25C.

--
Regards,
Linda


"Jon Peltier" wrote:

Linda -

Here is what I posted in response to a similar question last month:

Using dynamic ranges, you can create a chart whose series grow and
shrink
as
the range becomes longer and shorter. But you can't use dynamic ranges
to
vary the number of series in the chart. That would require some VBA.

Assuming the data starts in cell A1, you could define a name that
includes
the rows and columns up to the errors. Go to Insert menu Name
Define:

Name: ChartDataRange
Refers To:
=offset($A$1,0,0,COUNTA($A$1:$A$36)-SUM(IF(ISNA($A$1:$A$36),1,0)),COUNT($1:$1)+1)

I arbitrarily chose A1:A36; pick a range long enough to get all the
values
you may ever need.

Update the data, then run this macro:

Sub UpdateChart()
ActiveSheet.ChartObjects(1).Chart.SetSourceData _
Source:=ActiveSheet.Range("ChartDataRange"), _
PlotBy:=xlRows
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______

"linda" wrote in message
...
i've gone through all the post and others link but all of the
example
just
for static column..just define offset for each column.but now,my
table
is
changing both rows & column.i cant define for each column since
there
may
be
column with zero data.
my table full with function not only in the value,but also in the
labels
for
X & Y axis.

please someone do help me..thank you!
--
Regards,
Linda


"linda" wrote:

Hi!

in Sheet2:

B1=IF(COLUMNS($A:A)COUNT(Sheet1!$D:$D),"",INDEX(S heet1!$B:$B,SMALL(Sheet1!$D:$D,COLUMNS($A:A))))
-copy accross 40 columns

A2=IF(ROWS($1:1)COUNT(Sheet1!C:C),"",INDEX(Sheet1 !A:A,SMALL(Sheet1!C:C,ROWS($1:1))))
-copy accross 40 rows

B2=IF(OR(B$1="",$A2=""),"",SUMPRODUCT((Sheet1!$A$1 :$A$100=$A2)*(Sheet1!$B$1:$B$100=B$1)))
-copy accross 40rows*40columns

based on the function above,it will create a table of data where i
will
create a chart from it.i define 2 offset to create the chart:

CUST=OFFSET(Sheet2!$A$1,0,0,COUNTA(Sheet2!$A:$A),1 )
MOD=OFFSET(Sheet2!$B$2,0,0,1,COUNTA(Sheet2!$2:$2))

for now the chart has 25R*24C,therefore when i ceate the chart,it
is
based
on 40R*40C,included the row and column with no data.is it because
of
the
function in the cell?
i copy the function to 40R*40C as a space for new data since the
table
would
expand rows and column time by time.
the problem right now is i want the chart include the available
data
only..i
dont want it to include the zero data.is it possible?is yes,how?

thanks in advanced!

--
Regards,
Linda








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
Charts - formulas return #N/A but they still get charted bjw Charts and Charting in Excel 6 August 17th 07 02:58 AM
Charts return zero? linda Charts and Charting in Excel 0 August 17th 07 02:12 AM
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Excel Discussion (Misc queries) 2 March 15th 07 01:02 AM
charts for projected costs, revenue, return on investment (resort) david Charts and Charting in Excel 0 December 13th 05 11:18 AM
Can I use formulas that return cell range ref. in charts X series cwilliams Charts and Charting in Excel 4 June 3rd 05 03:08 PM


All times are GMT +1. The time now is 07:54 AM.

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

About Us

"It's about Microsoft Excel"