# If statements in number fields

Question asked by NigelBurton on Aug 20, 2014
Latest reply on Aug 20, 2014 by NigelBurton

### Title

If statements in number fields

### Post

I have two number fields in a table essentially calculating similar information. basically they look at a field called Division Code and based on that information should perform a calculation.

My problem is that the first formula works perfectly well and calculates the correct amount depending on which division is selected, but the second one does not, when the user chooses IST in the division code the second formula does not calculate anything.

Can anyone please tell me what is going wrong and suggest a solution.

Thanks

1st formula

If ( Container_Size = 0;0;If(Division_Code = "CSM" or Division_Code =  "FR";((460 * Number_Containers) / Total_MTs);If(Division_Code = "IST";If(Container_Size = 20;((800 * Number_Containers) / Total_MTs);If(Container_Size = 40;((1050 * Number_Containers) / Total_MTs))))))

2nd formula

If ( Container_Size = 0;0;If(Division_Code = "CSM" or Division_Code =  "FR";If ( Container_Size = 20;((600 * Number_Containers) / Total_MTs);If ( Container_Size = 40;((918 * Number_Containers ) / Total_MTs);If(Division_Code = "IST";If(Container_Size=20;((1000 *Number_Containers) / Total_MTs);((1280*Number_Containers)/Total_MTs)))))))