graph selection based on criteria

lucigen

New Member
Joined
Jun 9, 2011
Messages
15
Alright so I am trying to automate the creation of a bar graph where each data entry has 3 columns of data

ex: label at B2, data in C2, D2, E2

In A2 there is a data value, and if it is something other than blank then the data gets added to the graph, otherwise it is not included in the data set.

The other problem is that in the general case I dont know how many rows down this set of data goes. The data is generated by another macro so it needs to be flexible

I would try to post code but I don't really have any idea what to do here, first experience trying to make visuals

Any help would be vastly appreciated!!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
You don't need a macro for the graph.

Just use Offset, Count and Index/Match in a name for your chart series.

Put this in a name. make a chart and change the series to the name you created.

This formula uses offset starting a the top point, then goes down to the end of the data using count.

=OFFSET('Using Offset Formula'!$G$6,0,0,COUNTA('Using Offset Formula'!$G$6:$G$14),1)

you can find more on chandoo.org search for dyanmic-chart-tutorial.xlsx
 
Upvote 0
Hey thanks!

worked like a charm, I had to redo part of the other bit to make it skip some rows, but thats awesome.

Also I appreciate the super fast reply too!
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top