ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Maximization of a Cell (https://www.excelbanter.com/excel-programming/386705-maximization-cell.html)

amirstal[_2_]

Maximization of a Cell
 
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


okrob

Maximization of a Cell
 
On Apr 2, 1:15 pm, "amirstal" wrote:
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



okrob

Maximization of a Cell
 
On Apr 2, 1:20 pm, "okrob" wrote:
On Apr 2, 1:15 pm, "amirstal" wrote:

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


This could also go in the Worksheet_Change event so that anytime the
sheet is updated, it fires.


amirstal[_2_]

Maximization of a Cell
 
On Apr 2, 2:20 pm, "okrob" wrote:
On Apr 2, 1:15 pm, "amirstal" wrote:

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


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



All times are GMT +1. The time now is 11:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com