Forum Discussion
excel "signal"
If that "take … and change …" action is to be triggered by the change of value in a predefined cell (or a predefined set of cells), then conditionally yes. But the solution I am thinking of involves procedural code in VBA, which is implemented only for desktop versions of Excel. Which version are you using, on which operating system? Are you prepared to accept the security risks involved with using VBA?
VBA code that is written in a Worksheet_Change event handler will be invoked every time the value in any cell of the worksheet changes. (For a signal cell, that change is probably going to occur because it contains a formula that has been recalculated. Alternatively, some other code might be writing a value into the signal cell.) The code is informed which cells were changed, and it can determine: 1) which if any of the changed cells was a signal cell, and 2) what the new cell value is. If the value in a signal cell changes to 1, the code can then:
- change (e.g.) the signal cell's highlighting color;
- wait for a couple of seconds; and
- change the signal cell's value (e.g., to zero if you never want it to signal again), or change its formula or something in a related cell (if you want the cell to signal under some future condition). The latter type of change will probably require some design work by you.
<< to keep being "read" down the line in that cell. >>
Please clarify what you mean. You should also describe more generally what is to cause this signaling.
- Matt_CrokeMar 06, 2023Copper Contributor
Thank you, the path you described was basically the same as what I have come up with. I haven't been able to test yet but will soon. It's used in the interfacing of a trading machine. Excel now having better ability for that as a language, may have more of a demand for things like this trigger. Lots of signals are sent when a condition is met, that initiates the trade, but you may then want to exit the trade, but in doing so the condition is still met, and it fires off another position as soon as you go flat on the first position. A trigger could accept the change from a zero to a 1 in value, show the 1 for two seconds, and then revert to zero, waiting for next new signal. Thank you for your time.