Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Between 2 numbers??

Status
Not open for further replies.

flaviooooo

Programmer
Joined
Feb 24, 2003
Messages
496
Location
FR
Hi,

I was trying a simple formula, but can't find it in excel??

I have a field containing a number, and then another cell with a formula based on the number:

if the number is between 1 and 10 -> A, else -> B

But it appears BETWEEN doesn't exist in exel, like it does in Access..
Any ideas??
 
flavioooo

Can you use the AND worksheet function to achieve the same thing

example:

A1 contains a result. Anything greater than Zero but Less than 20 in A1 will return 15 in B1. Anything over 20 in A1 will return 25 in B1.

The formula in B1 will be =IF((AND(A1>0,A1<20)),15,25)

hwyl
Jonsi B-)
&quot;We live in a society exquisitely dependent on science & technology, in which hardly anyone knows anything about science & technology&quot;
 
yeah, that would work thanks ;)

Just find it extremely weird there is no direct function to achieve this
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top