# Using the IF function within the Dynamic Component

I have a nestles component (column) inside another component (module). The component (module) have the function to difference in lenY, X and Z.
The len Y can change into 4 different sizes. When changing the size I would like to move the nestled component (column) towards another y coordinate. That means that the column needs to move 3 times when changing the module.

I used this formula for the column: =IF(28_Module 2950_casco wand_kolom!LenY=980,613,568)

What I actually want is to add 2 more coordinates IF the module size changes towards another set size. How can I do this? Can the OR function help me in this? So yes, how?

Thank you guys in advance for helping me out.

Try to nest another if to formula.
Something like.
=if(something=20,than,if(something=30,than,else))

1 Like

@pupoksveta It worked! Thank you so much for your quick response

See below the formula I made (exactly the same you suggested):
=IF(28_Module 2950_kolom_kolom!LenY=980,349,IF(28_Module 2950_kolom_kolom!LenY=1100,377.7,IF(28_Module 2950_kolom_kolom!LenY=1180,422,281)))

Youâ€™re welcome.

@pupoksveta hi Miroslav I had another question regarding the same topic.

Ive changed my Width (LenX) attributes. When I update my formulas in the nestled components it does not work anymore. I just changed two attributes with 10cm.

I tried already to fill in the formula from skretch. And I also deleted the LenX values and filled it again. Did not work. Do you by any chance know how to fix this?

Try to upload the skp file that a could have a look.
Also give me info what you want to achieve.

Goodmorning, thank you for offering help.

The problem of the nestled components is that the columns (nestled components) donâ€™t move along the x direction together with the total width (LenX) of the component.

Kind regards,
Perhaps the `X` value for the nested column positions that need to move, should have a formula that divides their parentâ€™s componentâ€™s `LenX` value to get the spacing, and then multiply spacing by their copy number ?