Stacked If/Then Statements?

"number of holes@CrvPattern1" =iif("D1@Sketch4"<2, iif("D1@Sketch4">.75,"number of holes@CrvPattern1","numberD1@Sketch4">.75,"numberof holes@CrvPattern1"-1),"number ofholes@CrvPattern1"-1),"numberholes@CrvPattern1","number​ of holes@CrvPattern1"+1)

"number of holes@CrvPattern1”=iif("D1@Sketch4">2,"number of holes@CrvPattern1"+1,iif("D1@Sketch4">.75,"number of holes@CrvPattern1","number of holes@CrvPattern1"-1))

Error of "entered equation is invalid" when I hit ok.

I'm just messing around with stacking if statements and have tried both of these with no luck. I have a bar as seen below, where I want to change the number of holes in it depending on the spacing between holes. If the spacing is greater than 2, I want to add another hole. If spacing is less than .75, I want to remove a hole. Any ideas on how to fix this?

D1@Sketch4 is the spacing between the holes

Error of "entered equation is invalid" when I hit ok.

SolidworksParts And Features