Formula for the word "between"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I'm new here, hope you can help.
I am struggling with trying to test if a value is between two others with
the IF statement
A value between two others would be TRUE, so
If TRUE then 0
if FALSE then test if it larger or smaller
If smaller then -1
If larger then +1

I can't seem to get the whole thing off the ground, keep going in circles
Please help, getting dizzy

Thanks
(e-mail address removed)
 
As an example

=IF(A1<1000,-1,IF(A1>1000,1,0))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
With the target range as 1000 to 1010 inclusive then:

=-SIGN(A1<1000)+SIGN(A1>1010)

will give the returns required. But Bob's formula, (with a range), is more
intuitive.


--
HTH

Sandy
(e-mail address removed)
Replace@mailinator with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top