AnsweredAssumed Answered

Equation not working?

Question asked by Nicholas Faust on Aug 26, 2020
Latest reply on Aug 31, 2020 by Hemantkumar Patel

I've got an equation built in my global variables that determines the type of drawer glide I'm using in a cabinet. The equation I've built works in excel when I replace the global variable name with a cell location, but when I change the names back and pop it into solidworks, it doesn't work?

 


IIF ( "Hole C" = 20 , 10 + 5 / 8 , IIF ( "Hole C" = 12 + 13 / 16, 13.75 , IIF ( "Hole C" = 14.0625 , 15.75 , IIF ( "Hole D" = 25 , 17 + 11 / 16 , IIF ( "Hole D" = 17 + 13 / 16 , 19 + 11 / 16 , 21 + 5 / 8 ) ) ) ) )

 

The hole placement that is determined by the depth of the cabinet should then drive the profile length of the slides. 

 

When I enter the values of C = 15 3/16 and D = 17 13/16, it outputs 13 3/4, so I feel like it's getting hung up in the second if statement, but I can't figure out why?

Outcomes