ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Plotting if a certain criteria is met (https://www.excelbanter.com/charts-charting-excel/210954-plotting-if-certain-criteria-met.html)

EG

Plotting if a certain criteria is met
 
I am trying to select data for a bar chart. In Column B i have one of two
labels: ES or ZN. I would like the bar chart to plot only the values in
corresponding rows of column Q that have "ES" in the B column. Thus if:
B Q
1 ES 2
2 ZN 4
3 ES 3

The the chart should only show 2 bars: one for Q1 (2) and one for Q3 (3).

What would be the formula that i could write in the Chart Data Range box
that would accomplish this?

Thanks

EG

Dave Curtis

Plotting if a certain criteria is met
 
Hi,

You could try something as simple as putting the following in R1 and copying
down.

=IF(B1="ES",Q1,"")

Create your bar/column chart using columns B and R.
Obviously this will leave a gap in the chart, but than can be removed fairly
easily.
What do you want as your x-axis labels?

Dave

url:http://www.ureader.com/msg/10297252.aspx

EG

Plotting if a certain criteria is met
 
Thanks for the note. I tried this, by entering =if('PPR -Nov-08
restart'!$B$3="ES",'PPR -Nov-08 restart'!$Q$3,"") in the chart data range
box, which is the equivalent of what you have suggested, but it comes back
with the error messege, "This function is not valid". I can't figure out why
this would be the case.

any thoughts?

Thx.

EG

"Dave Curtis" wrote:

Hi,

You could try something as simple as putting the following in R1 and copying
down.

=IF(B1="ES",Q1,"")

Create your bar/column chart using columns B and R.
Obviously this will leave a gap in the chart, but than can be removed fairly
easily.
What do you want as your x-axis labels?

Dave

url:http://www.ureader.com/msg/10297252.aspx


Dave Curtis

Plotting if a certain criteria is met
 
I'm not sure you can use a formula in the chart data range box.

Dave

url:http://www.ureader.com/msg/10297252.aspx


All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com