Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
KR
 
Posts: n/a
Default repost: plz help- dynamic range with gaps?

Excel 2003 on Win 2000

I have a range of cells that I need to graph; each cell in the range has a
formula, but may or may not have actual data (so I can use an IF statement
to leave it blank or N/A).

My (internal) customer wants a column graph that only shows X-axis points
for the cells that have values- e.g. I need to supress the blank values
completely. How can I do this? I'm thinking a named range, but I don't know
what formula will give me the desired results...


For example:
(raw data)
Cats 100
Dogs 150
Ferrets 0 (or NA)
Fish 50

my graph needs to show:

X
X X
X X X
Cats Dogs Fish

Help!
Thanks,
Keith
--
The enclosed questions or comments are entirely mine and don't represent the
thoughts, views, or policy of my employer. Any errors or omissions are my
own.


  #2   Report Post  
Domenic
 
Posts: n/a
Default

Assuming that A2:B5 contains your data, and your formula for Column B
returns 0 when your IF statement is FALSE, try the following...

D2, copied down and over to the next column, Column E:

=IF(ROWS($D$2:D2)<=COUNTIF($B$2:$B$5,"0"),INDEX(A $2:A$5,SMALL(IF($B$2:$B
$50,ROW($B$2:$B$5)-ROW($B$2)+1),ROWS($D$2:D2))),"")

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Then, define the following dynamic ranges...

Insert Name Define

Name: ChartLabels

Refers to:
=Sheet1!$D$2:INDEX(Sheet1!$D$2:$D$65536,MATCH(2,1/(Sheet1!$D$2:$D$65536<
"")))

Click Add

Name: ChartValues

Refers to:
=Sheet1!$E$2:INDEX(Sheet1!$E$2:$E$65536,MATCH(2,1/(Sheet1!$D$2:$D$65536<
"")))

Click Ok

Lastly, change the chart's 'Data Source'...

1) Click on the column series to select it

2) In the 'Formula Bar', change the cell references to the named
ranges...

=SERIES(Sheet1!$E$1,Sheet1!ChartLabels,Sheet1!Char tValues,1)

(Sheet1!$E$1 contains the header/label for Column E.)

Hope this helps!

In article ,
"KR" wrote:

Excel 2003 on Win 2000

I have a range of cells that I need to graph; each cell in the range has a
formula, but may or may not have actual data (so I can use an IF statement
to leave it blank or N/A).

My (internal) customer wants a column graph that only shows X-axis points
for the cells that have values- e.g. I need to supress the blank values
completely. How can I do this? I'm thinking a named range, but I don't know
what formula will give me the desired results...


For example:
(raw data)
Cats 100
Dogs 150
Ferrets 0 (or NA)
Fish 50

my graph needs to show:

X
X X
X X X
Cats Dogs Fish

Help!
Thanks,
Keith

  #3   Report Post  
KR
 
Posts: n/a
Default

Wow, I'll both test this, and dissect it until I understand how it works!
Thanks a bunch,
Keith

"Domenic" wrote in message
...
Assuming that A2:B5 contains your data, and your formula for Column B
returns 0 when your IF statement is FALSE, try the following...

D2, copied down and over to the next column, Column E:

=IF(ROWS($D$2:D2)<=COUNTIF($B$2:$B$5,"0"),INDEX(A $2:A$5,SMALL(IF($B$2:$B
$50,ROW($B$2:$B$5)-ROW($B$2)+1),ROWS($D$2:D2))),"")

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Then, define the following dynamic ranges...

Insert Name Define

Name: ChartLabels

Refers to:
=Sheet1!$D$2:INDEX(Sheet1!$D$2:$D$65536,MATCH(2,1/(Sheet1!$D$2:$D$65536<
"")))

Click Add

Name: ChartValues

Refers to:
=Sheet1!$E$2:INDEX(Sheet1!$E$2:$E$65536,MATCH(2,1/(Sheet1!$D$2:$D$65536<
"")))

Click Ok

Lastly, change the chart's 'Data Source'...

1) Click on the column series to select it

2) In the 'Formula Bar', change the cell references to the named
ranges...

=SERIES(Sheet1!$E$1,Sheet1!ChartLabels,Sheet1!Char tValues,1)

(Sheet1!$E$1 contains the header/label for Column E.)

Hope this helps!

In article ,
"KR" wrote:

Excel 2003 on Win 2000

I have a range of cells that I need to graph; each cell in the range has

a
formula, but may or may not have actual data (so I can use an IF

statement
to leave it blank or N/A).

My (internal) customer wants a column graph that only shows X-axis

points
for the cells that have values- e.g. I need to supress the blank values
completely. How can I do this? I'm thinking a named range, but I don't

know
what formula will give me the desired results...


For example:
(raw data)
Cats 100
Dogs 150
Ferrets 0 (or NA)
Fish 50

my graph needs to show:

X
X X
X X X
Cats Dogs Fish

Help!
Thanks,
Keith



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
Dynamic named range across multiple sheets babycody Excel Discussion (Misc queries) 3 July 24th 05 06:03 AM
Question regarding dynamic range setting dharmik Excel Worksheet Functions 2 July 22nd 05 08:44 PM
How to dynamically reference a dynamic named range paris3 Excel Worksheet Functions 4 June 24th 05 01:22 AM
Dynamic Print Range Help waxwing Excel Worksheet Functions 2 February 21st 05 03:47 PM
Add a Dynamic Range with 2 Conditions Q John Excel Worksheet Functions 7 December 23rd 04 02:58 PM


All times are GMT +1. The time now is 09:26 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"