PC Review


Reply
Thread Tools Rate Thread

Can xy graph origin be control from a cell?

 
 
Jo
Guest
Posts: n/a
 
      2nd Aug 2007
Hi everyone,

Say you have xy graph with (0,0) as its origin. Of course you can make
the origin has any non-zero value by clicking the x axis and chaging
the value from 0 to, say, 5. Same thing to y axis by clicking on it.

If I have to make the origin value change frequently, is there a way
to do so from a cell?

Thanks,
Jo

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      2nd Aug 2007
Use the change event to detect the change in the cell and then do the VBA
equivalent to what you describe doing manually in your post.

Information on events
http://www.cpearson.com/excel/events.htm
and numerous posts in this newsgroup.
http://tinyurl.com/ypof8t for some examples

to get code on changing the axis, turn on the macro recorder while you do it
manually. Turn off the macro recorder and study the code recorded.

--
Regards,
Tom Ogilvy


"Jo" wrote:

> Hi everyone,
>
> Say you have xy graph with (0,0) as its origin. Of course you can make
> the origin has any non-zero value by clicking the x axis and chaging
> the value from 0 to, say, 5. Same thing to y axis by clicking on it.
>
> If I have to make the origin value change frequently, is there a way
> to do so from a cell?
>
> Thanks,
> Jo
>
>

 
Reply With Quote
 
Jo
Guest
Posts: n/a
 
      2nd Aug 2007
On Aug 2, 10:50 am, Tom Ogilvy <TomOgi...@discussions.microsoft.com>
wrote:
> Use the change event to detect the change in the cell and then do the VBA
> equivalent to what you describe doing manually in your post.
>
> Information on eventshttp://www.cpearson.com/excel/events.htm
> and numerous posts in this newsgroup.http://tinyurl.com/ypof8t for some examples
>
> to get code on changing the axis, turn on the macro recorder while you do it
> manually. Turn off the macro recorder and study the code recorded.
>
> --
> Regards,
> Tom Ogilvy
>
>
>
> "Jo" wrote:
> > Hi everyone,

>
> > Say you have xy graph with (0,0) as its origin. Of course you can make
> > the origin has any non-zero value by clicking the x axis and chaging
> > the value from 0 to, say, 5. Same thing to y axis by clicking on it.

>
> > If I have to make the origin value change frequently, is there a way
> > to do so from a cell?

>
> > Thanks,
> > Jo- Hide quoted text -

>
> - Show quoted text -


Tom,

Yes, but I guess I am missing something here. Say the origin was (0,0)
and want to change it to (2,5). When I click on either x or y axis, I
need to type that value which is 2 or 5.

So, if I am using macro, how would the macro record those new origin
values?

Thanks,
Mike

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      2nd Aug 2007
you said:

> is there a way to do so from a cell?


so you would write the event code to trap the entry you make in a specific
cell or specific cells (1 for x, 1 for y) and use the values placed there to
update the graph using the code you recorded.

--
Regards,
Tom Ogilvy


"Jo" wrote:

> On Aug 2, 10:50 am, Tom Ogilvy <TomOgi...@discussions.microsoft.com>
> wrote:
> > Use the change event to detect the change in the cell and then do the VBA
> > equivalent to what you describe doing manually in your post.
> >
> > Information on eventshttp://www.cpearson.com/excel/events.htm
> > and numerous posts in this newsgroup.http://tinyurl.com/ypof8t for some examples
> >
> > to get code on changing the axis, turn on the macro recorder while you do it
> > manually. Turn off the macro recorder and study the code recorded.
> >
> > --
> > Regards,
> > Tom Ogilvy
> >
> >
> >
> > "Jo" wrote:
> > > Hi everyone,

> >
> > > Say you have xy graph with (0,0) as its origin. Of course you can make
> > > the origin has any non-zero value by clicking the x axis and chaging
> > > the value from 0 to, say, 5. Same thing to y axis by clicking on it.

> >
> > > If I have to make the origin value change frequently, is there a way
> > > to do so from a cell?

> >
> > > Thanks,
> > > Jo- Hide quoted text -

> >
> > - Show quoted text -

>
> Tom,
>
> Yes, but I guess I am missing something here. Say the origin was (0,0)
> and want to change it to (2,5). When I click on either x or y axis, I
> need to type that value which is 2 or 5.
>
> So, if I am using macro, how would the macro record those new origin
> values?
>
> Thanks,
> Mike
>
>

 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      3rd Aug 2007
As answered in the other group:

http://peltiertech.com/Excel/Charts/...nkToSheet.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Tom Ogilvy" <(E-Mail Removed)> wrote in message
news:F2D2376D-317C-446F-8668-(E-Mail Removed)...
> you said:
>
>> is there a way to do so from a cell?

>
> so you would write the event code to trap the entry you make in a specific
> cell or specific cells (1 for x, 1 for y) and use the values placed there
> to
> update the graph using the code you recorded.
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Jo" wrote:
>
>> On Aug 2, 10:50 am, Tom Ogilvy <TomOgi...@discussions.microsoft.com>
>> wrote:
>> > Use the change event to detect the change in the cell and then do the
>> > VBA
>> > equivalent to what you describe doing manually in your post.
>> >
>> > Information on eventshttp://www.cpearson.com/excel/events.htm
>> > and numerous posts in this newsgroup.http://tinyurl.com/ypof8t for
>> > some examples
>> >
>> > to get code on changing the axis, turn on the macro recorder while you
>> > do it
>> > manually. Turn off the macro recorder and study the code recorded.
>> >
>> > --
>> > Regards,
>> > Tom Ogilvy
>> >
>> >
>> >
>> > "Jo" wrote:
>> > > Hi everyone,
>> >
>> > > Say you have xy graph with (0,0) as its origin. Of course you can
>> > > make
>> > > the origin has any non-zero value by clicking the x axis and chaging
>> > > the value from 0 to, say, 5. Same thing to y axis by clicking on it.
>> >
>> > > If I have to make the origin value change frequently, is there a way
>> > > to do so from a cell?
>> >
>> > > Thanks,
>> > > Jo- Hide quoted text -
>> >
>> > - Show quoted text -

>>
>> Tom,
>>
>> Yes, but I guess I am missing something here. Say the origin was (0,0)
>> and want to change it to (2,5). When I click on either x or y axis, I
>> need to type that value which is 2 or 5.
>>
>> So, if I am using macro, how would the macro record those new origin
>> values?
>>
>> Thanks,
>> Mike
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing a Origin Cell from Data Validation baconcow Microsoft Excel Programming 8 3rd Nov 2008 11:46 PM
Can xy graph origin be controlled from a cell? Jo Microsoft Excel Misc 1 3rd Aug 2007 12:24 AM
Need Destination cell to ref origin cell, but w/ many variables..H =?Utf-8?B?TXMuc2hvcGFsb3Q=?= Microsoft Excel Worksheet Functions 4 4th May 2007 09:31 PM
how do I create a line graph from a common origin? =?Utf-8?B?UmF5?= Microsoft Excel Charting 1 21st Feb 2006 03:48 AM
Why can't i set graph origin to 0 ( 1 = min) =?Utf-8?B?TUFE?= Microsoft Excel Charting 1 3rd Nov 2004 04:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:49 PM.