Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 46
Default Avoiding cells being included in a chart

I have a simple column chart which displays a value for each day of the
month taken from cells B19 to B49. Days 1 to 31 are taken from cells A19
to A49 and displayed on the X axis.

As the month progresses I wish to draw a horizontal line which shows the
average of the column B entries to date, ie on day 10 the 10 day average
will be calculated and a horizontal line drawn at the appropriate level
across the chart area from column 1 to column 10. The next day it would
be recalculated and then redrawn across from column 1 to column 11.

Unfortunately, my current attempt is not working as the line drops to
the X axis when cells in column B have not been entered. The structure is...

Cells A19 to A49 hold the days of the month: 1 to 31

I enter a value for each day starting from B19 and going up to B49.

F14 holds =SUM(B19:B49) to total B19 to B49

I14 holds =COUNT(B19:B49) to determine how many cells in B19 to B49 hold
a value

H14 holds =(F14/I14) to average the values entered in B19 to B49,
ignoring cells that have yet to have values entered

I then use =IF(B190,$H$14,"") in D19, and similar in the rows down to
row 49, to read H14 into all of the rows where column B has had a value
entered

From the entries in D19 to D49 I then draw a line graph using these
values against the Y axis.

Is anyone able to describe how I can avoid the line being drawn beyond
the point where I have entered data, yet still allow me to calculate the
average automatically?

Apologies if the above isn't over clear: this is the fourth attempt at
clarity!

TIA

--
F

  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1,549
Default Avoiding cells being included in a chart


Use a line-column chart. Include the average column as part of the source range.
"#N/A" is not plotted when used as data for a chart.
So modify your formula(s) to use #N/A as the alternate value instead of "".
--
Jim Cone
Portland, Oregon USA .
http://www.mediafire.com/PrimitiveSoftware .
(XL Companion add-in: compares, matches, counts, lists, finds, deletes...)





"F" <news@nowhere
wrote in message
...
I have a simple column chart which displays a value for each day of the month taken from cells B19
to B49. Days 1 to 31 are taken from cells A19 to A49 and displayed on the X axis.

As the month progresses I wish to draw a horizontal line which shows the average of the column B
entries to date, ie on day 10 the 10 day average will be calculated and a horizontal line drawn at
the appropriate level across the chart area from column 1 to column 10. The next day it would be
recalculated and then redrawn across from column 1 to column 11.

Unfortunately, my current attempt is not working as the line drops to the X axis when cells in
column B have not been entered. The structure is...

Cells A19 to A49 hold the days of the month: 1 to 31

I enter a value for each day starting from B19 and going up to B49.

F14 holds =SUM(B19:B49) to total B19 to B49

I14 holds =COUNT(B19:B49) to determine how many cells in B19 to B49 hold a value

H14 holds =(F14/I14) to average the values entered in B19 to B49, ignoring cells that have yet to
have values entered

I then use =IF(B190,$H$14,"") in D19, and similar in the rows down to row 49, to read H14 into
all of the rows where column B has had a value entered

From the entries in D19 to D49 I then draw a line graph using these values against the Y axis.

Is anyone able to describe how I can avoid the line being drawn beyond the point where I have
entered data, yet still allow me to calculate the average automatically?

Apologies if the above isn't over clear: this is the fourth attempt at clarity!

TIA

--
F




..
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1,549
Default Avoiding cells being included in a chart

Use a line-column chart. Include the average column as part of the source range.
"#N/A" is not plotted when used as data for a chart.
So modify your formula(s) to use #N/A as the alternate value instead of "".
--
Jim Cone
Portland, Oregon USA .
http://www.mediafire.com/PrimitiveSoftware .
(XL Companion add-in: compares, matches, counts, lists, finds, deletes...)




"F" <news@nowhere
wrote in message
...
I have a simple column chart which displays a value for each day of the month taken from cells B19
to B49. Days 1 to 31 are taken from cells A19 to A49 and displayed on the X axis.

As the month progresses I wish to draw a horizontal line which shows the average of the column B
entries to date, ie on day 10 the 10 day average will be calculated and a horizontal line drawn at
the appropriate level across the chart area from column 1 to column 10. The next day it would be
recalculated and then redrawn across from column 1 to column 11.

Unfortunately, my current attempt is not working as the line drops to the X axis when cells in
column B have not been entered. The structure is...

Cells A19 to A49 hold the days of the month: 1 to 31

I enter a value for each day starting from B19 and going up to B49.

F14 holds =SUM(B19:B49) to total B19 to B49

I14 holds =COUNT(B19:B49) to determine how many cells in B19 to B49 hold a value

H14 holds =(F14/I14) to average the values entered in B19 to B49, ignoring cells that have yet to
have values entered

I then use =IF(B190,$H$14,"") in D19, and similar in the rows down to row 49, to read H14 into
all of the rows where column B has had a value entered

From the entries in D19 to D49 I then draw a line graph using these values against the Y axis.

Is anyone able to describe how I can avoid the line being drawn beyond the point where I have
entered data, yet still allow me to calculate the average automatically?

Apologies if the above isn't over clear: this is the fourth attempt at clarity!
TIA
--
F




..
  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1,549
Default Avoiding cells being included in a chart

Use a line-column chart. Include the average column as part of the source range.
"#N/A" is not plotted when used as data for a chart.
So modify your formula(s) to use #N/A as the alternate value instead of "".
--
Jim Cone
Portland, Oregon USA .
http://www.mediafire.com/PrimitiveSoftware .
(XL Companion add-in: compares, matches, counts, lists, finds, deletes...)




"F" <news@nowhere
wrote in message
...
I have a simple column chart which displays a value for each day of the month taken from cells B19
to B49. Days 1 to 31 are taken from cells A19 to A49 and displayed on the X axis.

As the month progresses I wish to draw a horizontal line which shows the average of the column B
entries to date, ie on day 10 the 10 day average will be calculated and a horizontal line drawn at
the appropriate level across the chart area from column 1 to column 10. The next day it would be
recalculated and then redrawn across from column 1 to column 11.

Unfortunately, my current attempt is not working as the line drops to the X axis when cells in
column B have not been entered. The structure is...

Cells A19 to A49 hold the days of the month: 1 to 31

I enter a value for each day starting from B19 and going up to B49.

F14 holds =SUM(B19:B49) to total B19 to B49

I14 holds =COUNT(B19:B49) to determine how many cells in B19 to B49 hold a value

H14 holds =(F14/I14) to average the values entered in B19 to B49, ignoring cells that have yet to
have values entered

I then use =IF(B190,$H$14,"") in D19, and similar in the rows down to row 49, to read H14 into
all of the rows where column B has had a value entered

From the entries in D19 to D49 I then draw a line graph using these values against the Y axis.

Is anyone able to describe how I can avoid the line being drawn beyond the point where I have
entered data, yet still allow me to calculate the average automatically?

Apologies if the above isn't over clear: this is the fourth attempt at clarity!

TIA

--
F



  #5   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 46
Default Avoiding cells being included in a chart

On 10/12/2011 06:40 Jim Cone wrote:

Use a line-column chart. Include the average column as part of the source range.
"#N/A" is not plotted when used as data for a chart.
So modify your formula(s) to use #N/A as the alternate value instead of "".


Brilliant: thank you! And so simple!

--
F


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
When building a chart Dates are been included that are not in thedate range Sh0t2bts Excel Worksheet Functions 1 October 14th 09 03:58 PM
Cells not included in formulas Knucklehead Excel Discussion (Misc queries) 3 July 22nd 08 06:25 PM
Avoiding Calculating Cells on the Status bar Satish Excel Discussion (Misc queries) 3 April 19th 07 02:16 PM
Avoiding empty cells showing as zero in line chart without na() [email protected] Charts and Charting in Excel 2 January 3rd 07 12:59 PM
AVOIDING DUPLICATES IN A RANGE OF CELLS Glint Excel Discussion (Misc queries) 11 August 9th 06 11:54 AM


All times are GMT +1. The time now is 08:43 PM.

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"