View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Use checkbox to toggle between formula and manual input

This may not work for you.

But I use a couple of columns.

Say column A contains the question/description/whatever.
Then column B could contain the formula (call it the calculated default answer)
Column C would contain the manual override value
Then Column D would contain the value to be used.

=if(c2<"",c2,b2)

And all subsequent formulas would point at the values in column D.

If you find seeing column D irritating, you could hide it.

With the worksheet protected and the formula cells locked (and the manual input
columns unlocked), it may ever work!

packat wrote:

I have an array of formulas.
I wanted to enable manual user input on these array but
still preserve the formula. So I added a checkbox.
(DefaultOpt).

If the box is checked the formula is restored into the
cells in the array. The following code seems to work. (But
suggestion for any improvement is welcome. I am sort of
green at Excel/VBA)

----
Private Sub defaultOpt_Click()
For i = 15 To 28
ActiveWorkbook.Worksheets("Model 2").Cells(i,
4).Formula = "=FORMULA HERE"
end sub
----

However, I also want to make sure that, if the value of a
cell in the array is changed, the box should become
unchecked.

Any suggestion how I proceed to do this?
Thanks in advance,
pac


--

Dave Peterson