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, optional-value 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, optional-value 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
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!