stop updating if condition met

kangyao

New Member
Joined
Jan 24, 2021
Messages
2
Office Version
  1. 2013
Platform
  1. Windows
I am creating a spreadsheet to track stock performance. There's 5 column
  • A. StockName
  • B. TargetPrice
  • C. TodayPrice (update daily)
  • D. TargetPriceDate
When TodayPrice hit TargetPrice, I would like TargetPriceDate to display today date and locked itself from further updating even TodayPrice is updated in future dates.

Currently I'm using following formula in column D2
=IF(C2>=B2, TODAY();"")

but it will keep updating on daiy basis so i lost track of what'a the actual date of the conditioned met. is there any solution to this without using VB?
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

BenMiller

Well-known Member
Joined
Nov 17, 2011
Messages
1,961
Office Version
  1. 365
Platform
  1. Windows
Not really. If you would set up your data a little differently, it might be possible. Instead of updating your data to replace the old data, let every day's data populate a new column, and then you can easily look up which column has the number that matches your target price.
 

kangyao

New Member
Joined
Jan 24, 2021
Messages
2
Office Version
  1. 2013
Platform
  1. Windows
Can I do it using VBA to fulfil following

There are 5 columns
  • A. StockName
  • B. TargetPrice
  • C. TodayPrice (update daily)
  • D. TargetPriceDate
  • E. Formula
E2 will evaluate two conditions
  1. C2 >= B2
  2. ISBLANK(D2)
If condition met, E2 will write the value of Today() into D2 . the date in D2 shouldnt change upon write in.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,328
Messages
5,635,624
Members
416,869
Latest member
JeffK26

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top