# Microsoft Office Application Help - Excel Help forum > Excel Formulas & Functions >  >  If between function...

## killertofu

I am trying to figure out if there is a non-macro function that I can write for this scenario:

If A1 is greater than 10 and less than 50, return YES.

Here's what I had, but it always returns false:
=IF(A1>10 & A1<=50,"YES","NO")

Thanks peeps.  All help is welcome!

----------


## Franz Verga

killertofu wrote:
> I am trying to figure out if there is a non-macro function that I can
> write for this scenario:
>
> If A1 is greater than 10 and less than 50, return YES.
>
> Here's what I had, but it always returns false:
> =IF(A1>10 & A1<=50,"YES","NO")
>
> Thanks peeps.  All help is welcome!


Try this way:

=IF(AND(A1>10,A1<=50),"YES","NO")

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy

----------


## Franz Verga

Franz Verga wrote:
> killertofu wrote:
>> I am trying to figure out if there is a non-macro function that I can
>> write for this scenario:
>>
>> If A1 is greater than 10 and less than 50, return YES.
>>
>> Here's what I had, but it always returns false:
>> =IF(A1>10 & A1<=50,"YES","NO")
>>
>> Thanks peeps.  All help is welcome!
>
>
> Try this way:
>
> =IF(AND(A1>10,A1<=50),"YES","NO")


Also

=IF((A1>10)*(A1<=50),"YES","NO")

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy

----------


## killertofu

Thank you very much!

----------


## options

I have the same problem as killertofu

i.e. >> I am trying to figure out if there is a non-macro function that I can
>> write for this scenario:
>>
>> If A1 is greater than 10 and less than 50, return YES.

The problem with using the AND function and the * is that it counts as another logical argument and there is a limit of 8 arguments to a function

is there somithing like 10<A1<50 or something that may work?


PS using the * is quite interesting - haven't seen that one before

All help appreciated

----------


## DiddlyAnne

Thank you, this solution really worked.

----------


## Ellensdottir

The solution (A1>10)*(A1<50) worked for me in conditional formatting, which has an implied IF and no AND. So thanks!





> Franz Verga wrote:
> > killertofu wrote:
> >> I am trying to figure out if there is a non-macro function that I can
> >> write for this scenario:
> >>
> >> If A1 is greater than 10 and less than 50, return YES.
> >>
> >> Here's what I had, but it always returns false:
> >> =IF(A1>10 & A1<=50,"YES","NO")
> ...

----------


## rahneel

Gr8.The last formula helps a lot.

Regards,

Rahul

----------


## rahneel

Cn you please help me to create a simple dashboards in Excel 2003 ? Thanking you in advance.

Regards,

Rahul
rahneel4@gmail.com

----------


## arlu1201

rahneel,

Welcome to the Forum, unfortunately:

_Your post does not comply with Rule 2 of our Forum_ RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

----------


## sotheany

Dear All,

I am happy to share my idea.

I have one idea on it. you all can use this Formulas.

=IF(AND(B3<=50000,AND(B3>0)),1,0)

I hope this function can helpful.

Best Regards
Sotheany

----------


## sotheany

Please try this

=IF(AND(A1<=50,AND(A1>10)),"Yes","No")

Hope it will helpful

----------


## FDibbins

sotheany, this is an old thread, I doubt it is still being followed

Thank you for sharing your suggestion with us, but you don't need the 2nd AND in there...
=IF(AND(A1<=50,*AND(*A1>10)),"Yes","No")
=IF(AND(A1<=50,A1>10)),"Yes","No")

which then becomes pretty much what was already suggested

----------

