Your current syntax assumes, that somevariable is boolean, i.e. True or False!
When this is case, simply use somevariable instead of If .. End If
When this not the case, then something like
Code:
=somevariable = SomeExpression
(where SomeExpresion may be a value, or [> something], or [Null], or [whatever]) will do.