# The If Then Calcuation

This topic is 5702 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

• Newbies

I am trying to do a multiple of the if then calcuation.

What I have now...

If ( Number Box = "1" ; "01")

This works great but only for 1 entry. I want to expand the calcuation for numbers 1 to 9.

I tried this...

If ( Number Box = "1" ; "01")

If ( Number Box = "2" ; "02")

If ( Number Box = "3" ; "03")

And so on up to 9, however I need to find out What to do to make it move on to the next line of if then. Is this possible? Please help if you can.

##### Share on other sites

Hi

when you have to work with multiple "If" statmenth, you can nest them... but is better to use the Case() function.

So, for example:

Case(

Number Box = "1" ; "01";

Number Box = "2" ; "02";

Number Box = "3" ; "03";

...

Number Box = "9" ; "09"

)

or simpler (result text)

Case(

Number Box <= 9; "0"&Number Box;

""

)

##### Share on other sites

• Newbies

Thank you so much, It worked perfectly

##### Share on other sites

This topic is 5702 days old. Please don't post here. Open a new topic instead.

## Create an account

Register a new account