#### mikeprice53

##### Active Member

- Joined
- Jan 21, 2003

- Messages
- 297

=IF(J2<19.99,1,IF(AND(J2>=20,J2<=39.99),2,IF(AND(J2>=40,J2<=59.99),3,IF(AND(J2>=60,J2<=79.99),4,IF(AND(J2>=80,J2<=99.99),5,IF(AND(J2>=100,J2<=119.99),6,IF(AND(J2>=120,J2<=139.99),7,0)))))))

only thing is that is the maximum ( I think ) amount of If I can use at once If I am correct as when I try to go on with it ( There are 16 parts to it not just eh seven stated there ) it highlights my last AND and tells me the formula is incorrect when looking and looking very thoroughly at it ?

Basically I am doing a price breakdown into 18 catagories and the formula you see has teh first 7 in it... the list I use is this:

0-19.99

20-39.99

40-59.99

60-79.99

80-99.99

100-119.99

120-139.99

140-159.99

160-179.99

180-199.99

200-249.99

250-299.99

300-349.99

350-399.99

400-499.99

500-699.99

700-999.99

1000+

Im sure you see the way I was going about this. Is there a limit to the amount I get to use or not ?

Please help...Oh and Thanx :0)