View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Jon Peltier Jon Peltier is offline
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