IF / AND Function for Checkbox
Hello,
I am struggling to get a formula to work. I have a sheet tracking vehicle hours. (hours updated automatically through API feed) and would like to have a check box selected if the vehicle hours fall within a range. (the range is between 4900 & 5000. (each row is one vehicle)
My formula is =IF(AND([Meter Reading]@row>4900)[Meter Reading]@row<5000,1)
if I simply do the below formula for the "over 4900" it works great, but to make a range of 4900 to 5000 then it becomes #UNPARSEABLE
=IF(AND([Meter Reading]@row > 4900), 1)
How should I write my formula to create the "range" required to only watch the window of between 4900 & 5000?
thank you
Best Answer

I think you just need to rearrange your parentheses and add a comma. You're closing out the AND statement prematurely. The correct syntax is:
IF(AND(logical expression1, logical expression2, etc.), value if true, optionalvalue if false)
=IF(AND([Meter Reading]@row>4900, [Meter Reading]@row<5000), 1)
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Answers

I think you just need to rearrange your parentheses and add a comma. You're closing out the AND statement prematurely. The correct syntax is:
IF(AND(logical expression1, logical expression2, etc.), value if true, optionalvalue if false)
=IF(AND([Meter Reading]@row>4900, [Meter Reading]@row<5000), 1)
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Thank you!
that was perfect. Formula works great.
Truly very much appreciated
Help Article Resources
Categories
Check out the Formula Handbook template!