# Multiple IF AND Nesting Formulas

Options
✭✭✭

Trying to return a number based on the GVWR column, we have multiple GVWR's and want to return differnt numbers in the TARE column. I keep getting a syntax error and can't figure out why. Ultimately there will be 5 options, showing two below. It works with one IF formula.

=IF(GVWR@row = 9500, 5840), IF(AND(GVWR@row = 9950, 6740))

## Answers

• ✭✭✭✭✭
Options

@Steve_B1 Good morning, I am sure we can come up with something for you but I need a bit more information. Would you be able to share a screenshot of the sheet, dummy data is fine it helps a lot.

Also in the TARE column, what are the 5 options you would like to add, in the above formula there isn't anything defined if true other than another if(and statement so I am not sure what should populate if the first if is satisfied.

Thanks,

• ✭✭✭✭✭✭
edited 07/26/23
Options

Where are you wanting your TRUE/FALSE to live in your equation? Right now you have if =IF(GVWR@row = 9500, 5840) is true then run another if. IF you are wanting the statement to be True based on both GVWR statements being true, then you need to move your AND statement.

=IF(AND(GVWR@row = 9500, GVWR@row = 9950),"5840,6740",FALSE)

• ✭✭✭
Options
• ✭✭✭
Options

Here is the whole formula with all 5 options

=IF(AND(GVWR@row = 6050, 6050), IF(AND(GVWR@row = 6500, 6500), IF(AND(GVWR@row = 9500, 5840), IF(AND(GVWR@row = 9950, 6740), IF(AND(GVWR@row = 10360, 6770))))))

• ✭✭✭✭✭
Options

@Steve_B1 Gotcha, the and was throwing me off there a bit sorry about that..

Is this what you're looking for?

=IF(GVWR@row = 6050, "6050", IF(GVWR@row = 6500, "6500", IF(GVWR@row = 9500, "5840", IF(GVWR@row = 9950, "6740", IF(GVWR@row = 10360, "6770")))))

• ✭✭✭
Options

Yes, thank you! I thought "" were only necessary for text.

• ✭✭✭✭✭
Options

Yea, you dont have to use the "" its habit I was going to update the post but I figured if you asked I would just reply. If you want a number just leave the "" off, my mistake..

• ✭✭✭
Options

Great, thanks again for the help!

• ✭✭✭✭✭✭
Options

@Cory Page Thank you. I was away, but the clarification on the use of the AND statement definitely helped.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!