#1   Report Post  
Riskybizniz
 
Posts: n/a
Default Stumped by IF

Hi, a (likely) easy problem but has me stumped.
A user can enter an article code in A1. I want to check if this value is
between 30000 and 40000 OR between 550000 and 569999. If the value falls
outside these 2 ranges A2 displays Error. I have been trying IF in
combination with OR, AND etc...

help?

kindest regards,
Chris
  #2   Report Post  
garfield-n-odie
 
Posts: n/a
Default

Try:
=IF(OR(AND(A1=30000,A1<=50000),AND(A1=550000,A1< =569999)),"true","false")

"Riskybizniz" wrote:

Hi, a (likely) easy problem but has me stumped.
A user can enter an article code in A1. I want to check if this value is
between 30000 and 40000 OR between 550000 and 569999. If the value falls
outside these 2 ranges A2 displays Error. I have been trying IF in
combination with OR, AND etc...

help?

kindest regards,
Chris

  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
one way:
=IF(OR(AND(A1=30000,A1<=40000),AND(A1=550000,A1< =569999)),"No
error","Error")

--
Regards
Frank Kabel
Frankfurt, Germany

"Riskybizniz" schrieb im
Newsbeitrag ...
Hi, a (likely) easy problem but has me stumped.
A user can enter an article code in A1. I want to check if this value

is
between 30000 and 40000 OR between 550000 and 569999. If the value

falls
outside these 2 ranges A2 displays Error. I have been trying IF in
combination with OR, AND etc...

help?

kindest regards,
Chris


  #4   Report Post  
Riskybizniz
 
Posts: n/a
Default

Great!!! dare I ask one more thing? If nothing is entered there should be no
message.

thanks!!
Chris

"garfield-n-odie" wrote:

Try:
=IF(OR(AND(A1=30000,A1<=50000),AND(A1=550000,A1< =569999)),"true","false")

"Riskybizniz" wrote:

Hi, a (likely) easy problem but has me stumped.
A user can enter an article code in A1. I want to check if this value is
between 30000 and 40000 OR between 550000 and 569999. If the value falls
outside these 2 ranges A2 displays Error. I have been trying IF in
combination with OR, AND etc...

help?

kindest regards,
Chris

  #5   Report Post  
garfield-n-odie
 
Posts: n/a
Default

=IF(ISBLANK(A1),"",IF(OR(AND(A1=30000,A1<=50000), AND(A1=550000,A1<=569999)),"true","false"))

"Riskybizniz" wrote:

Great!!! dare I ask one more thing? If nothing is entered there should be no
message.

thanks!!
Chris

"garfield-n-odie" wrote:

Try:
=IF(OR(AND(A1=30000,A1<=50000),AND(A1=550000,A1< =569999)),"true","false")

"Riskybizniz" wrote:

Hi, a (likely) easy problem but has me stumped.
A user can enter an article code in A1. I want to check if this value is
between 30000 and 40000 OR between 550000 and 569999. If the value falls
outside these 2 ranges A2 displays Error. I have been trying IF in
combination with OR, AND etc...

help?

kindest regards,
Chris



  #6   Report Post  
Riskybizniz
 
Posts: n/a
Default

Cool!

many thanks!

"garfield-n-odie" wrote:

=IF(ISBLANK(A1),"",IF(OR(AND(A1=30000,A1<=50000), AND(A1=550000,A1<=569999)),"true","false"))

"Riskybizniz" wrote:

Great!!! dare I ask one more thing? If nothing is entered there should be no
message.

thanks!!
Chris

"garfield-n-odie" wrote:

Try:
=IF(OR(AND(A1=30000,A1<=50000),AND(A1=550000,A1< =569999)),"true","false")

"Riskybizniz" wrote:

Hi, a (likely) easy problem but has me stumped.
A user can enter an article code in A1. I want to check if this value is
between 30000 and 40000 OR between 550000 and 569999. If the value falls
outside these 2 ranges A2 displays Error. I have been trying IF in
combination with OR, AND etc...

help?

kindest regards,
Chris

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
List box has me stumped. Eric Excel Discussion (Misc queries) 1 January 10th 05 11:29 PM
Stumped! Collecting values into one cell. AthleteTO Excel Worksheet Functions 5 November 2nd 04 04:24 PM
Stumped! Collecting values into one cell. AthleteTO Excel Worksheet Functions 0 November 1st 04 07:29 PM


All times are GMT +1. The time now is 04:31 PM.

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"