|
现有下表, 型号 | 均价 | A1 | 1900 | A2 | 4300 | A3 | 12500 | 增加一个字段,对均价自动进行判别,成为下表
(价格区间分为=<2500,(2500,3000],(3000,3500],(3500,4000]........每500为一个区间,直至大于或等于100,00时,最后的区间是>=10000
型号 | 均价 | 价格区间 | A1 | 1900 | =<2500 | A2 | 4300 | (4000,4500] | A3 | 12500 | >=10000 | 我编写的代码是
IIf([均价]<=2500,"=<2500",
IIf([均价]>2500 And [均价]<=3000,"(2500,3000]",
IIf([均价]>3000 And [均价]<=3500,"(3000,3500]",
IIf([均价]>3500 And [均价]<=4000,"(3501,4000]",
IIf([均价]>4000 And [均价]<=4500,"(4000,4500]",
IIf([均价]>4500 And [均价]<=5000,"(4500,5000]",
IIf([均价]>5000 And [均价]<=5500,"(5000,5500]",
IIf([均价]>5500 And [均价]<=6000,"(5500,6000]",
IIf([均价]>6000 And [均价]<=6500,"(6000,6500]",
IIf([均价]>6500 And [均价]<=7000,"(6500,7000]",
IIf([均价]>7000 And [均价]<=7500,"(7000,7500]",
IIf([均价]>7500 And [均价]<=8000,"(7500,8000]",
IIf([均价]>8000 And [均价]<=10000,"(8000,10000]",">10000")))))))))))))
AS 价格区间
可是在运行时,总是溢出,什么原因呢?
应如何解决? |
|