Maximization of a Cell

  • Thread starter Thread starter amirstal
  • Start date Start date
A

amirstal

A cell's value is automatically linked to the price of X, which is
constantly changing.
How can I capture the highest price of X in a different cell?

For example, if the highest price of X (in cell A1 for example) was 90
and then moved down to 50, cell B1 will show 90. But if the price
moved higher to 100, it will reflect in B1 as well.

Thanks,

AMir
 
A cell's value is automatically linked to the price of X, which is
constantly changing.
How can I capture the highest price of X in a different cell?

For example, if the highest price of X (in cell A1 for example) was 90
and then moved down to 50, cell B1 will show 90. But if the price
moved higher to 100, it will reflect in B1 as well.

Thanks,

AMir

How is x changed? If it's with code, you could insert an if statement
into the code that checks the value of x against the value of cell
A1. Or you could just make this it's own routine and call it from the
routine that changes the value of X on the sheet.

If [A1].Value > [B1].Value Then
[B1].Value = [A1].Value
Else
End If
 
A cell's value is automatically linked to the price of X, which is
constantly changing.
How can I capture the highest price of X in a different cell?
For example, if the highest price of X (in cell A1 for example) was 90
and then moved down to 50, cell B1 will show 90. But if the price
moved higher to 100, it will reflect in B1 as well.

AMir

How is x changed? If it's with code, you could insert an if statement
into the code that checks the value of x against the value of cell
A1. Or you could just make this it's own routine and call it from the
routine that changes the value of X on the sheet.

If [A1].Value > [B1].Value Then
[B1].Value = [A1].Value
Else
End If

This could also go in the Worksheet_Change event so that anytime the
sheet is updated, it fires.
 
A cell's value is automatically linked to the price of X, which is
constantly changing.
How can I capture the highest price of X in a different cell?
For example, if the highest price of X (in cell A1 for example) was 90
and then moved down to 50, cell B1 will show 90. But if the price
moved higher to 100, it will reflect in B1 as well.

AMir

How is x changed? If it's with code, you could insert an if statement
into the code that checks the value of x against the value of cell
A1. Or you could just make this it's own routine and call it from the
routine that changes the value of X on the sheet.

If [A1].Value > [B1].Value Then
[B1].Value = [A1].Value
Else
End If

A1 is automatically linked to an outside application that provides
data to excel constantly.
 
Back
Top