I have text in cell A1 as below
((True And False Or True) And (True And (Not True))) And (False Or True)
I need to evaluate this text and put the Boolean result (True / False) in another cell B1 using the VBA code .
I tried using the Evaluate function, it does not work
When I read this cell, it always returns a double quote string type enclosed in both directions. Therefore, it is treated as a string and does not evaluate a Boolean expression.
"((True And True Or True) And (True And (True))) And (True Or True)"
I want to write this path, but it does not work
If Range("A1").Value = True Then
Range("B1").Value = True
Else
Range("B1").Value = False
End If
I tried to save in a Boolean variable as well
Dim Result as Boolean
Result = CBool(Range("A1").Value)
since this is a string, I get type mismatch when I tried to convert using CBool
Can anybody help?
early.