I need a little help with my formuala's. CRXI
The field being evaluated is non-numeric.
My goal is to calulate a numeric amount from that field.
If amount is up to $5,000.00 then $25.00
If amount is between 5,001.00 to $25,000.00 then "$105.00"
If amount is between 25,001.00 to $50,000.00 then "180.00"
If over 50,000.00 then $1.00 for every thousand.
I was able to do two (2) formulas that work for below and above the $50,000.00 but when I try and put them together into one formula is comes back with a string is required here and highlights the "IF" in the last else if line.
1st is to calculate 35% of that field. I did this in a formula that works fine. I coverted the non numeric field to a number by formula(Co App to num) using.
If Not isNull({cpmain.udftext2}) Then
If isNumeric ({cpmain.udftext2}) Then ToNumber ({cpmain.udftext2})
Else 0
2nd - I used this formula to calulate 35%.
roundup ({@Co App to num} * .35,-1)
3rd - On the seventh line it stops and highlights the "IF" and states a string is required here.
If {cpmain.udfcheck1} = True then
if {@Co App 35%} <= 5000.00 then "25.00"
else if {@Co App 35%} >= 5001.00 and {@Co App 35%} <= 25000 then "105.00"
else if {@Co App 35%} >= 25001.00 and {@Co App 35%} <= 50000.00 then "180.00"
else if {@Co App 35%} >= 50001.00 then
RoundUp ({@Co App 35%}- 50000.00,-3)
* .003
+ 180.00
Else 0
Example
Number entered in field 360,200.00
35% is equal to 126,080.00
Since over $50,000.00
126,080.00 - 50,000.00 = 76,080.00
Rounded up to 77,000.00 X 3 = 231
231 + 180 = $411.00
Any suggesstions would be greatly appreciated. Thanks in advance.
The field being evaluated is non-numeric.
My goal is to calulate a numeric amount from that field.
If amount is up to $5,000.00 then $25.00
If amount is between 5,001.00 to $25,000.00 then "$105.00"
If amount is between 25,001.00 to $50,000.00 then "180.00"
If over 50,000.00 then $1.00 for every thousand.
I was able to do two (2) formulas that work for below and above the $50,000.00 but when I try and put them together into one formula is comes back with a string is required here and highlights the "IF" in the last else if line.
1st is to calculate 35% of that field. I did this in a formula that works fine. I coverted the non numeric field to a number by formula(Co App to num) using.
If Not isNull({cpmain.udftext2}) Then
If isNumeric ({cpmain.udftext2}) Then ToNumber ({cpmain.udftext2})
Else 0
2nd - I used this formula to calulate 35%.
roundup ({@Co App to num} * .35,-1)
3rd - On the seventh line it stops and highlights the "IF" and states a string is required here.
If {cpmain.udfcheck1} = True then
if {@Co App 35%} <= 5000.00 then "25.00"
else if {@Co App 35%} >= 5001.00 and {@Co App 35%} <= 25000 then "105.00"
else if {@Co App 35%} >= 25001.00 and {@Co App 35%} <= 50000.00 then "180.00"
else if {@Co App 35%} >= 50001.00 then
RoundUp ({@Co App 35%}- 50000.00,-3)
* .003
+ 180.00
Else 0
Example
Number entered in field 360,200.00
35% is equal to 126,080.00
Since over $50,000.00
126,080.00 - 50,000.00 = 76,080.00
Rounded up to 77,000.00 X 3 = 231
231 + 180 = $411.00
Any suggesstions would be greatly appreciated. Thanks in advance.