formula for stock quote

  • Thread starter Thread starter edgarc
  • Start date Start date
E

edgarc

I want to have my stock quotes updated to show the highest price th
stock has reached. I input the daily stock price in column A and I wan
that checked against column B which shows the highest past price. I
the new input in column A is higher, I want that column B change
automatically to reflect the new higher price. If the input price i
column A is not higher, I want column B to remain the same, reflectin
the older and higher price.
Everything I've tried on my own results in a circular error, even whe
I change the number of iterations and their parameters.
Answer to (e-mail address removed) please
Thanks to any in advance
Edgar Couda
 
If you check iteration (check the checkbox) and change the max to 1, you
shouldn't get a circular reference error.

in B1
=if(B1<A1,A1,B1)
 
Hi
another way using VBA would be the use of the worksheet_change event.
Try the following code in your worksheet module:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Target, Me.Range("A:A")) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
On Error GoTo CleanUp
With Target
If .Value > Me.Range("B1").value Then
Application.EnableEvents = False
Me.Range("B1").value = .value
end If
End With

CleanUp:
Application.EnableEvents = True
End Sub

Frank
 
Back
Top