Hi All,
I have the following situation in Excel and hope that someone can post a clean VBA solution to it (I am guessing a Worksheet_Calculate procedure after declaring some DIMs and CONSTs, Option Explicit, Option Base 1, Option Compare Text, DisableEvents etc...).
The situation is as below (hope to explain it as clearly and accurately as possible to facilitate the solution):
* I have a open excel worksheet (Call it worksheet A)
* One cell in Worksheet A (call it Cell X) has a formula
* Cell X formula is linked to another formula which is ultimately linked to an external data feed.
* As a result of the external data feed and as long as the data feed connection is ON, Cell X is dynamically changing throughout the day.
* Cell X value changes fluctuate between 0, positive and negative numbers (whole integer numbers i.e. no decimals. Example, 0, 803, -3,205, 0, 10,502 etc...)
Having described the situation above, I am seeking a VBA Private Sub Worksheet_Calculate() procedure that:
* CumSum all the positive value changes in once Cell (call it Cell Y). Cell Y can be in worksheet A or a separate worksheet.
* CumSum all the negative value changes in once Cell (call it Cell Z). Cell Z can be in worksheet A or a separate worksheet.
Many thanks in advance.
I have the following situation in Excel and hope that someone can post a clean VBA solution to it (I am guessing a Worksheet_Calculate procedure after declaring some DIMs and CONSTs, Option Explicit, Option Base 1, Option Compare Text, DisableEvents etc...).
The situation is as below (hope to explain it as clearly and accurately as possible to facilitate the solution):
* I have a open excel worksheet (Call it worksheet A)
* One cell in Worksheet A (call it Cell X) has a formula
* Cell X formula is linked to another formula which is ultimately linked to an external data feed.
* As a result of the external data feed and as long as the data feed connection is ON, Cell X is dynamically changing throughout the day.
* Cell X value changes fluctuate between 0, positive and negative numbers (whole integer numbers i.e. no decimals. Example, 0, 803, -3,205, 0, 10,502 etc...)
Having described the situation above, I am seeking a VBA Private Sub Worksheet_Calculate() procedure that:
* CumSum all the positive value changes in once Cell (call it Cell Y). Cell Y can be in worksheet A or a separate worksheet.
* CumSum all the negative value changes in once Cell (call it Cell Z). Cell Z can be in worksheet A or a separate worksheet.
Many thanks in advance.