Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
aries
 
Posts: n/a
Default I AM TRYING TO USE BETWEEN IN IF THEN ELSE

how do i use between instead of greater than or less than , in if then else
statement
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus
 
Posts: n/a
Default I AM TRYING TO USE BETWEEN IN IF THEN ELSE

To test A1 againts range 100,200:

=IF(AND(A1<=100,A1<=200),"In range","out range")

There is no "between" operator.

HTH
--
AP

"aries" a écrit dans le message de news:
...
how do i use between instead of greater than or less than , in if then
else
statement



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph
 
Posts: n/a
Default I AM TRYING TO USE BETWEEN IN IF THEN ELSE

"aries" wrote in message
...
how do i use between instead of greater than or less than , in if then
else
statement


If you're looking for A1 to be between B1 and C1, try
=IF(AND(A1B1,A1<C1),D1,E1)
--
David Biddulph


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default I AM TRYING TO USE BETWEEN IN IF THEN ELSE

aries wrote...
how do i use between instead of greater than or less than , in if then else
statement


Excel lacks SQL's BETWEEN operator, but if you really can't use < or
for whatever reason, you could try something like

="x "&IF(MEDIAN(x,a,b)=x,"","not ")&"between a and b"

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers
 
Posts: n/a
Default I AM TRYING TO USE BETWEEN IN IF THEN ELSE

Perhaps ....

=IF(AND(A1=100,A1<=200),"In range","out range")


"Ardus Petus" wrote:

To test A1 againts range 100,200:

=IF(AND(A1<=100,A1<=200),"In range","out range")

There is no "between" operator.

HTH
--
AP

"aries" a écrit dans le message de news:
...
how do i use between instead of greater than or less than , in if then
else
statement






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default I AM TRYING TO USE BETWEEN IN IF THEN ELSE

Interesting. I modified it slightly so I could test it and it performed as
expected:

=C4&IF(MEDIAN(C4,A4,B4)=C4,""," not ")&" between " & A4 & " and " & B4

You learn something new every day (or in my case, every other day.)
--
Kevin Vaughn


"Harlan Grove" wrote:

aries wrote...
how do i use between instead of greater than or less than , in if then else
statement


Excel lacks SQL's BETWEEN operator, but if you really can't use < or
for whatever reason, you could try something like

="x "&IF(MEDIAN(x,a,b)=x,"","not ")&"between a and b"


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"