# Worksheet if-then statement

## Recommended Posts

I'm working on an energy code worksheet and having trouble working out the if-then statement function:

Basically, I want the worksheet to automatically say how many credits I need based on the area of the building. The area is shown in cell C1. In cell D3 I would like a formula that says: if the value in cell C1 is less than 1500 then display 5 (if the area is less than 1500 sq ft we need 5 energy credits), if the value is between 1500 and 5000 then display 8 (we need 8 credits for a 1500 - 5000 area), if the value is greater than 5000 then display 9 (for 5000 or greater areas we need 9 credits).

I started with the if((logical_test), value_if_true,value_if_false) syntax: =if((C1=<1500), 5,0)  but I'm definitely getting something wrong, it just shows the formula instead of a result. Does anyone know where I'm going wrong?

Thanks,

Kit

1270 SF is a string and not a number.

Try and see what happens if you enter only 1270 into C1.

• Vectorworks, Inc Employee

As Pat mentioned C1 has to be a number, then you can try this =IFS(C1<=1500, '5', C1>=5000, '9',(C1>1500) & (C1<5000), '8')

HTH

• Vectorworks, Inc Employee

You may add a Trailer for SF

Thanks Pat, I should have mentioned I had a trailer in that cell.

Thanks Juan Carlos, your formula did the trick!

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×

• KBASE
• #### MARIONETTE

×
• Create New...