Dim vRange() as String Dim strRangeMin as string Dim strRangeMax as string Dim strResult as string Dim dblMin as Number Dim dblMax as Number Dim strRange as string strResult = {Lab_FormMaker_GetResult_ReagentValues.sResult} dblMin = {Lab_FormMaker_GetResult_ReagentValues.sMin} dblMax = {Lab_FormMaker_GetResult_ReagentValues.sMax} strRange = {Lab_FormMaker_GetResult_ReagentValues.sNValues} if isnumeric(strResult) = True then if len(trim(strRange)) > 0 then if instr(1,strRange,"<=") > 0 then strRangeMax = Replace(strRange,"<=","") if cdbl(strResult) > cdbl(strRangeMax) then Formula = "H" else Formula = "" end if elseif instr(1,strRange,"< =") > 0 then strRangeMax = Replace(strRange,"< =","") if cdbl(strResult) > cdbl(strRangeMax) then Formula = "H" else Formula = "" end if elseif instr(1,strRange,">=") > 0 then strRangeMax = Replace(strRange,">=","") if cdbl(strResult) < cdbl(strRangeMax) then Formula = "L" else Formula = "" end if elseif instr(1,strRange,"> =") > 0 then strRangeMax = Replace(strRange,"> =","") if cdbl(strResult) < cdbl(strRangeMax) then Formula = "L" else Formula = "" end if elseif left(strRange,1) = "<" or left(strRange,1) = ">" then if left(strRange,1) = "<" then if cdbl (strResult) >= cdbl(Replace(strRange,"<","")) then Formula = "H" end if elseif left(strRange,1) = ">" then if cdbl (strResult) <= cdbl(Replace(strRange,"<","")) then Formula = "L" end if end if else if cdbl(dblMin) > 0 and cdbl(dblMax) > 0 then if cdbl(strResult) < cdbl(dblMin) then Formula = "L" elseif cdbl(strResult) > cdbl(dblMax) then Formula = "H" else Formula = "" end if else if instr(1,strRange,"-") > 0 then vRange = Split(strRange,"-") strRangeMin = vRange(1) strRangeMax = vRange(2) if cdbl(strResult) < cdbl(strRangeMin) then Formula = "L" elseif cdbl(strResult) > cdbl(strRangeMax) then Formula = "H" else Formula = "" end if else Formula = "" end if end if end if else Formula = "" end if else Formula = "" end if