you have a sub called Worksheet_Change. that event is triggered when cells on the worksheet are changed by the user or by an external link. per this: https://docs.microsoft.com/en-us/off...rksheet.change
so, obviously that will work for you because your link IS an external link. furthermore, F9 on the keyboard has always updated calculations in an entire book. that's been the case forever, I believe. but at the moment, your code does nothing. if you want to learn:
to test what triggers the change event, I put fake data into your sheet, double clicked in one of the cells and pushed the enter button. and I saw the message that you see in image 1 below. image 2 shows the code that I used. so, you can take that inevitable process, learn from it, then write the following code to get what you want in col ''D'':
So, obviously you will have to change this a bit, because your data is coming in dynamically. you need a way to find a trigger for that.
and obviously the excel-based trigger for it would be the worksheet change event. but, if that is so, you can't do what I've written technically,
because that would throw col b data into col c AFTER your data would be refreshed. and thus, both columns of data would be the same.
to remedy this problem, store the data that comes in, on the change event that I've just mentioned, in another column.
that way, the code that runs, as in my example, can throw data from that temp column (which would be the last price, from the last update),
into col d. then your cur data would be in col c. done. and you can repeat that process forever. see attached book for a sample i gave you.
I did everything except col I. don't know what you mean by points, nor will I look at it. i'm not in the stock business. hope this helps.
Bookmarks