Maximization of a Cell

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
 
O

okrob

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
 
O

okrob

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

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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top