Thread: VBA help
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default VBA help

You don't need VBA. You can do it with a circular reference formula. (A
circular reference is a formula that refers to the same cell that contains
the formula.) Use the following in D10:

=IF(C10=1,"Latched",D10)

If C10 is any value other than 1, D10 will be 0. If C10 equals 1, D10 will
be "Latched". Now, if C10 is changed back to 0, D10 will retain the
"Latched" value. To use circular references, you need to go to the Tools
menu, choose Options, then the Calculation tab. There, check the
"Iterations" box.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)







"Mike B." wrote in message
...
In excel:

Inputs:
C8-- button can change value to 1 or 0
C9-- =A3 (which can either be a 1 or 0)

Output:
C10-- =IF(C8=1,0,IF(C9=1,1,0))

Dilemma:
When C10 is equal to 1, I want D10 to read "LATCHED". However, when C10
turns back into a 0 by changing the inputs, I want D10 to still read
"LATCHED". I want to be able to do this without buttons, requiring the use
of
Worksheet_Change or something manner which I have no idea about.

Thanks in advance!