IF statement with a range
If your first test included D2<= 500, do you really want to test for D2=501
in the next condition?
At present you are returning the answer "0" for cases where D2 is <0, or if
it is 500 and <501, or 1000 and <1001, or 5000 and <5001, or 10000 and
<10001, or 25000 and <25001. Did you really intend that? Can't you get
rid of the ANDs?
--
David Biddulph
"ricky" wrote in message
...
Thanks guys for the solutions. Worked just fine.
I took it a step further by writing nested IF statements on the FALSE
portion, to cater for differing values of D2.
This is what I came up with :
=IF(AND(D2=0,D2<=500),"0-500",IF(AND(D2=501,D2<=1000),"501-1000",IF(AND(D2
=1001,D2<=5000),"1001-5000",IF(AND(D2=5001,D2<=10000),"5001-10000",IF(AND(
D2=10001,D2<=25000),"10001-25000",IF((D2=25001),"25001","0"))))))
Kind Regards
Ricky
"Ron Coderre" wrote in message
...
Try this:
=IF(AND(D20,D2<5000000), "5m","0m")
Does that help?
***********
Regards,
Ron
XL2002, WinXP
"ricky" wrote:
Hi
Is there anyway I can write the following:
IF(D20 and <5000000, "5m","0m")
To populate another cell for reporting purposes.
Kind Regards
Ricky
|