ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Triple state command button (https://www.excelbanter.com/excel-programming/372438-triple-state-command-button.html)

John Davies

Triple state command button
 
I have a toggle button that is linked to a cell that I want to use in triple
state. On the 1st click the cell returns TRUE, on the 2nd click the cell
returns FALSE, but on the 3rd click the cell returns #N/A. How can I get the
cell value to show 100 on the 1st click, 200 on the 2nd click and 0 on the
3rd click.

Thanks in advance of any help.

John

Peter T

Triple state command button
 
Hi John,

Indeed the toggle button (controls toolbox) doesn't appear to trigger an
event on it's third state. However as the linked cell changes to #N/A with
the linked cell in B14 the following returns your set of values

=IF(ISERROR(B14),0,IF(B14,100,200))

Regards,
Peter T

"John Davies" wrote in message
...
I have a toggle button that is linked to a cell that I want to use in

triple
state. On the 1st click the cell returns TRUE, on the 2nd click the cell
returns FALSE, but on the 3rd click the cell returns #N/A. How can I get

the
cell value to show 100 on the 1st click, 200 on the 2nd click and 0 on the
3rd click.

Thanks in advance of any help.

John





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

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