[Solved] IF(AND) arguments

Discuss the spreadsheet application
Post Reply
Shawn85206
Posts: 2
Joined: Thu May 24, 2018 8:39 pm

[Solved] IF(AND) arguments

Post by Shawn85206 »

I'm trying to get a sheet to tell me if a cell is between two values found in other cells. I want it to give me a value of 1 if true, and zero if false. Another function calculates the total score. This is the current formula.

=IF(AND(D7>D2;D7<E2)1,0)

Cell D7 has the value to be tested, D2 has the low limit, E2 has the high limit. If the value in Dt meets the hi/low limits, I want a value of 1, else a value of zero.

I've tried it with and without parenthesis around the 1 and zero, but both ways give me an Err:508. What am I missing here???

It feels like it should be super straightforward.
Last edited by Shawn85206 on Fri May 25, 2018 2:17 am, edited 2 times in total.
Shawn85206
OpenOffice 4.14 on Windows 10
FJCC
Moderator
Posts: 9280
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: IF(AND arguments

Post by FJCC »

Use semicolons between all arguments.
=IF(AND(D7>D2;D7<E2);1;0)
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: IF(AND) arguments

Post by RusselB »

As FJCC stated, you need to use the semi-colon between your arguments,
That aside, the main reason that you're getting an error is that there's no separator (semi-colon (as used in OpenOffice) or comma (as used in M$Excel)) between the closing parenthesis if the AND and the 1 for the TRUE return value.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Shawn85206
Posts: 2
Joined: Thu May 24, 2018 8:39 pm

Re: IF(AND) arguments

Post by Shawn85206 »

Thank you so much!
Shawn85206
OpenOffice 4.14 on Windows 10
Post Reply