Forum Discussion
Some Excel help - Data validation using name ranges - force option if "False"
- Apr 30, 2019
can mark this as resolved.. had to use a VBA script which is something i just learned today
for anyone it may potentially help who googled and found this however I've added what I used above
you go into VBA (Alt+F11), choose the worksheet you want
click the "change" option on the right side
and add the code below:
If Target.Address = "$C$4" Then
Range("E28").Value = "Please Select..."End If
(change the cell values to match the ones you need..)
If I have understood your question correctly, the answer is that there is no way of forcing an input cell to switch to "No" if C22 is below that 590 range? It is possible to build the references to the data so that C22 is tested and if it is <590 the "Yes" is simply ignored and "No" is used
= IF(C22<590, "No", UserInput)
I would also observe that you appear to be going round in circles using "True"/"False" and "Yes"/"No" to represent the Boolean values TRUE/FALSE [or, alternatively, 1/0]. Using Boolean values your first formula reduces to
= IF($N$28, $Q$3:$Q$4, $Q$4)
whilst the next one is
= $C$22>=590
If you prefer 0/1 to FALSE/TRUE then the functions N() and SIGN() each convert Booleans to integers which allows custom number formatting.
thanks for the reply, the reason I done the true and false is because if its 590 or over I want the user to have the ability to select Yes or No, but if under 590 then the cell to automatically update to No
is this possible with the formula you referenced do you think?
- PeterBartholomew1Apr 30, 2019Silver Contributor
Many things are possible, that does not necessarily mean they are a good idea. It is only too easy to get caught out by one's own 'cleverness' at a later date! Using Booleans rather than strings probably is a good idea but the number formatting within conditional formats is a step too far.