Try to use the IIF function. Yes there are two I’s.
I attached my example of your case in weldment part. You can find my syntax in Equation Manager.
You can drive PostSize by PostDist value in Equations Manager or in Sketch1 dimension.
P1_weld.SLDPRT.zip 65.2 KB
First of all I would like to thank you for taking the time to look into my problem, I'm sorry about the late reply (very busy at work this week).
I had a look at your part and it works great within the part but I needed it to work as an assembly.
All is well though as I used your set up with a Sketch to determine PostDist within an assembly and then I used the same formula as before but with the two i's (iif) and it works perfectly.
Just really wanted to thank you for your help and your time.