Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default updating prices for a line chart

I apologise first as similar questions have been asked before, I
guess being honest I just did not understand the answers !
I want to chart share prices with a line chart. I have 20 company
names in A1:T1. Their current prices are imported via another
programme and show in B2:T2.
I have no problem in making a chart showing the company names and
their current prices, but the problem is when the share price
changes. All that happens at the moment is the price is overwritten
and all I see on the chart is the current price (previous price is
lost).
How can I get the line chart to show old prices and the current
price ?
Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default updating prices for a line chart

Don't let the other program obliterate the previous prices. Charts only
chart data that is in the source data range, not what may once have been
there. Either move the previous data prior to the update, or have the update
place the new numbers in the next row.

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


wrote in message
ups.com...
I apologise first as similar questions have been asked before, I
guess being honest I just did not understand the answers !
I want to chart share prices with a line chart. I have 20 company
names in A1:T1. Their current prices are imported via another
programme and show in B2:T2.
I have no problem in making a chart showing the company names and
their current prices, but the problem is when the share price
changes. All that happens at the moment is the price is overwritten
and all I see on the chart is the current price (previous price is
lost).
How can I get the line chart to show old prices and the current
price ?
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default updating prices for a line chart


Don't let the other program obliterate the previous prices. Charts only
chart data that is in the source data range, not what may once have been
there. Either move the previous data prior to the update, or have the update
place the new numbers in the next row.

- Jon



Thanks for that. That is the problem i have.
The prices can update every second, so copy and paste is not an
option.
There must be some code that lets the data feed the chart and then
move the data or let the chart be updated from different rows ?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default updating prices for a line chart

I've worked with clients to provide this functionality, essentially a
routine that detects an update (using worksheet_calculate) and copies the
new data to a table of previous results on another sheet; this table is used
as the chart's source data range.

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


wrote in message
oups.com...

Don't let the other program obliterate the previous prices. Charts only
chart data that is in the source data range, not what may once have been
there. Either move the previous data prior to the update, or have the
update
place the new numbers in the next row.

- Jon



Thanks for that. That is the problem i have.
The prices can update every second, so copy and paste is not an
option.
There must be some code that lets the data feed the chart and then
move the data or let the chart be updated from different rows ?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default updating prices for a line chart

On 10 Jun, 01:16, "Jon Peltier"
wrote:
I've worked with clients to provide this functionality, essentially a
routine that detects an update (using worksheet_calculate) and copies the
new data to a table of previous results on another sheet; this table is used
as the chart's source data range.

- Jon



Thanks Jon. I have decided to ditch the graph and just use figures. I
will be able to watch trends by highlighting high, low and average of
each price.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default updating prices for a line chart

Does this mean you know how to archive the data already, just not chart it?

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


wrote in message
ups.com...
On 10 Jun, 01:16, "Jon Peltier"
wrote:
I've worked with clients to provide this functionality, essentially a
routine that detects an update (using worksheet_calculate) and copies the
new data to a table of previous results on another sheet; this table is
used
as the chart's source data range.

- Jon



Thanks Jon. I have decided to ditch the graph and just use figures. I
will be able to watch trends by highlighting high, low and average of
each price.



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default updating prices for a line chart

On 11 Jun, 05:00, "Jon Peltier"
wrote:
Does this mean you know how to archive the data already, just not chart it?

- Jon
-------


Jon

A guy at work kindly gave me some code - i now have a command button
and every click i get the current prices in the next free column. I
had the problem that formulas were being copied when i needed values,
but the code i have seems to have got around that. Although i am still
putting together the program to meet my needs. Eventually i shall get
the code to click in everytime theres a price change.

Dim looper, across_number As Integer

across_number = Worksheets("data").Cells(2, "B")
If across_number = 0 Then across = "A"
If across_number = 1 Then across = "B"
(above line is repeated by an increase of 1 of the number and letter)
For looper = 1 To Worksheets("data").Cells(1, "B")

Worksheets("show").Cells(looper, across) =
Worksheets("data").Cells(looper, "A")

Next


i have to enter the if across_number line for each entry, at the
moment i`m up to - If across_number = 51 Then across = "AZ"

do you know any smarter code so i do not have to enter that line for
each column ?

thanks


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default updating prices for a line chart

You can refer to column number instead of letter:

Worksheets("data").Cells(2, 2)

If you want the value in a cell, use

Worksheets("data").Cells(2, 2).Value

I think you can make it much easier with this:

Worksheets("show").Cells(looper, across_number + 1).Value = _
Worksheets("data").Cells(looper, "A").Value

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


"charlie" wrote in message
oups.com...
On 11 Jun, 05:00, "Jon Peltier"
wrote:
Does this mean you know how to archive the data already, just not chart
it?

- Jon
-------


Jon

A guy at work kindly gave me some code - i now have a command button
and every click i get the current prices in the next free column. I
had the problem that formulas were being copied when i needed values,
but the code i have seems to have got around that. Although i am still
putting together the program to meet my needs. Eventually i shall get
the code to click in everytime theres a price change.

Dim looper, across_number As Integer

across_number = Worksheets("data").Cells(2, "B")
If across_number = 0 Then across = "A"
If across_number = 1 Then across = "B"
(above line is repeated by an increase of 1 of the number and letter)
For looper = 1 To Worksheets("data").Cells(1, "B")

Worksheets("show").Cells(looper, across) =
Worksheets("data").Cells(looper, "A")

Next


i have to enter the if across_number line for each entry, at the
moment i`m up to - If across_number = 51 Then across = "AZ"

do you know any smarter code so i do not have to enter that line for
each column ?

thanks




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
updating destination when I add a line to my source workbook mygrandmashousecat Excel Worksheet Functions 1 May 22nd 07 08:00 PM
Getting line on line chart to display after creation from Pivot Table dcsi_jim Charts and Charting in Excel 8 February 6th 07 08:54 PM
How to add a Vertical Line to a Column or Line Chart with two axes already in use? Alan Charts and Charting in Excel 6 December 13th 06 03:37 AM
Make a line in a bar chart, and change color of any bars that exceed the line MarkM Excel Discussion (Misc queries) 4 July 5th 06 04:06 PM
Use a multiplier to change List Prices to Net prices Dangada Excel Worksheet Functions 1 July 6th 05 06:31 AM


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