ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help on IF please! (https://www.excelbanter.com/excel-programming/390402-help-if-please.html)

cimbom

Help on IF please!
 
How can I create an IF formula that shows that if the number is
between 0 and 500 it is 0, if it is between 500 and 1000 it is 1, if
it is between 1000 and 1500 it is 2. For example: H5 calculates
number of gallons. And, I5 should calculate that if H5 is between 0
and 500 it is 0, if H5 is between 500 and 1000 it is 1, if it is
between 1000 and 1500 it is 2. I did this, but it does not work
=IF(H5=500,1,IF(H5=1000,2,IF(H5=1500,3))) How can I do that? I
would appreciate your help. Thanks.


Gary Keramidas

Help on IF please!
 
you can give this a try, not sure i got all of your conditions, though

=IF(H5=1500,3,IF(AND(H5<1500,H5=1000),2,IF(H5<50 0,0,1)))

--


Gary


"cimbom" wrote in message
oups.com...
How can I create an IF formula that shows that if the number is
between 0 and 500 it is 0, if it is between 500 and 1000 it is 1, if
it is between 1000 and 1500 it is 2. For example: H5 calculates
number of gallons. And, I5 should calculate that if H5 is between 0
and 500 it is 0, if H5 is between 500 and 1000 it is 1, if it is
between 1000 and 1500 it is 2. I did this, but it does not work
=IF(H5=500,1,IF(H5=1000,2,IF(H5=1500,3))) How can I do that? I
would appreciate your help. Thanks.




Dave Patrick

Help on IF please!
 
=IF(AND(H6=0,H6<500),0,IF(AND(H6=500,H6<1000),1, IF(AND(H6=1000,H6<1500),2,"N")))

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"cimbom" wrote:
How can I create an IF formula that shows that if the number is
between 0 and 500 it is 0, if it is between 500 and 1000 it is 1, if
it is between 1000 and 1500 it is 2. For example: H5 calculates
number of gallons. And, I5 should calculate that if H5 is between 0
and 500 it is 0, if H5 is between 500 and 1000 it is 1, if it is
between 1000 and 1500 it is 2. I did this, but it does not work
=IF(H5=500,1,IF(H5=1000,2,IF(H5=1500,3))) How can I do that? I
would appreciate your help. Thanks.



JE McGimpsey

Help on IF please!
 
Or, with fewer functions:

=IF(H6<500,0,IF(H6<=1000,1,IF(H6<=1500,2,3)))

The AND()'s are unnecessary since the second IF will only execute if
H6=500 - so no need to test...

In article ,
"Dave Patrick" wrote:

=IF(AND(H6=0,H6<500),0,IF(AND(H6=500,H6<1000),1, IF(AND(H6=1000,H6<1500),2,"
N")))


cimbom

Help on IF please!
 
On May 30, 9:55 pm, "Gary Keramidas" <GKeramidasATmsn.com wrote:
you can give this a try, not sure i got all of your conditions, though

=IF(H5=1500,3,IF(AND(H5<1500,H5=1000),2,IF(H5<50 0,0,1)))

--

Gary

"cimbom" wrote in message

oups.com...



How can I create an IF formula that shows that if the number is
between 0 and 500 it is 0, if it is between 500 and 1000 it is 1, if
it is between 1000 and 1500 it is 2. For example: H5 calculates
number of gallons. And, I5 should calculate that if H5 is between 0
and 500 it is 0, if H5 is between 500 and 1000 it is 1, if it is
between 1000 and 1500 it is 2. I did this, but it does not work
=IF(H5=500,1,IF(H5=1000,2,IF(H5=1500,3))) How can I do that? I
would appreciate your help. Thanks.- Hide quoted text -


- Show quoted text -


Hey, Thanks a million man! You are great! I might ask you more
questions. Thanks...


Dana DeLouis

Help on IF please!
 
If you had a large range, maybe:

=FLOOR(A1,500)/500

--
Dana DeLouis
Windows XP & Excel 2007


"cimbom" wrote in message
oups.com...
How can I create an IF formula that shows that if the number is
between 0 and 500 it is 0, if it is between 500 and 1000 it is 1, if
it is between 1000 and 1500 it is 2. For example: H5 calculates
number of gallons. And, I5 should calculate that if H5 is between 0
and 500 it is 0, if H5 is between 500 and 1000 it is 1, if it is
between 1000 and 1500 it is 2. I did this, but it does not work
=IF(H5=500,1,IF(H5=1000,2,IF(H5=1500,3))) How can I do that? I
would appreciate your help. Thanks.




Gary Keramidas

Help on IF please!
 
just post your questions, there're a lot of people here that know a whole lot
more than i do.

--


Gary


"cimbom" wrote in message
oups.com...
On May 30, 9:55 pm, "Gary Keramidas" <GKeramidasATmsn.com wrote:
you can give this a try, not sure i got all of your conditions, though

=IF(H5=1500,3,IF(AND(H5<1500,H5=1000),2,IF(H5<50 0,0,1)))

--

Gary

"cimbom" wrote in message

oups.com...



How can I create an IF formula that shows that if the number is
between 0 and 500 it is 0, if it is between 500 and 1000 it is 1, if
it is between 1000 and 1500 it is 2. For example: H5 calculates
number of gallons. And, I5 should calculate that if H5 is between 0
and 500 it is 0, if H5 is between 500 and 1000 it is 1, if it is
between 1000 and 1500 it is 2. I did this, but it does not work
=IF(H5=500,1,IF(H5=1000,2,IF(H5=1500,3))) How can I do that? I
would appreciate your help. Thanks.- Hide quoted text -


- Show quoted text -


Hey, Thanks a million man! You are great! I might ask you more
questions. Thanks...





All times are GMT +1. The time now is 09:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com