Previous in Forum: Getting Back Into Programming   Next in Forum: HTML Coding Help
Close
Close
Close
3 comments
Rate Comments: Nested
Commentator

Join Date: May 2009
Location: Mumbai
Posts: 73

Auto Range Selection of Column Chart by Macro

04/28/2011 2:43 PM

I am using a macro which plot a chart using macro in excel.

X-axis: machine no. & Y-axis : no. of motors

Range of X & Y is variable and may be 5 to 60 nos.

I want to plot a chart using macro by auto selecting the range without empty/blank cell.

How to plot a chart with variable auto selection of given data range?

__________________
Thanks
Register to Reply
Pathfinder Tags: macro
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15600
Good Answers: 981
#1

Re: Auto Range Selection of Column Chart by Macro

04/28/2011 3:47 PM

Ahem, maybe you should read the help notes for the application that you are using. In Mathcad auto-ranging is a simple function.

__________________
"Don't disturb my circles." translation of Archimedes last words
Register to Reply
Active Contributor

Join Date: Sep 2006
Location: Michigan, USA
Posts: 20
Good Answers: 2
#2

Re: Auto Range Selection of Column Chart by Macro

04/29/2011 3:24 PM

Websites below define how to make an automatic chart that resizes without a macro to match the size of the square of data.

You will need to use a named range and offset commands.

http://www.techrepublic.com/article/create-an-excel-chart-that-automatically-updates-with-new-data/6064314

http://spreadsheetpage.com/index.php/tip/update_charts_automatically_when_you_enter_new_data/

http://office.microsoft.com/en-us/excel-help/using-named-ranges-to-create-dynamic-charts-in-excel-HA001109801.aspx

Or you can use the result from offset command to define the square for the graph. You can use the result of that cell inside your macro to create a chart.

__________________
All truth passes through 3 stages. First it is ridiculed. Second it is violently opposed. Third it is accepted as being self evident. --Aurthur Schopenhauer
Register to Reply Score 1 for Good Answer
Commentator

Join Date: May 2009
Location: Mumbai
Posts: 73
#3
In reply to #2

Re: Auto Range Selection of Column Chart by Macro

05/04/2011 9:45 PM

Thanks Smitch!

You have solved my major problem...

Very useful & perfect reply you have given.

__________________
Thanks
Register to Reply
Register to Reply 3 comments

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

dhanesh.koshti (1); redfred (1); smith (1)

Previous in Forum: Getting Back Into Programming   Next in Forum: HTML Coding Help

Advertisement