# Formula Help with RoundUp

I have a formula I am trying to implement in a table and currently have it written as follows:

If(And(IsBlank(thisRow.[Homicide Num]),IsBlank(thisRow.[Homicide Rate]))," ",
If(And(thisRow.[Homicide Num]>0,thisRow.[Homicide Rate]>0,thisRow.[Country ID]=“9”,“44”,“136”),thisRow.[Homicide Num]+RoundUp(thisRow.[Homicide Rate]/SwitchIf(thisRow.[Country ID]=“9”,“0.2”,thisRow.[Country ID]=“44”,“0.3”,thisRow.[Country ID]=“136”,“0.4”),0),
If(And(thisRow.[Homicide Num]=0,thisRow.[Homicide Rate]=0,thisRow.[Country ID]=“9”,“44”,“136”),RoundUp((thisRow.[Homicide Num]+1)+(((1/thisRow.Population)*100000)/SwitchIf(thisRow.[Country ID]=“9”,“0.2”,thisRow.[Country ID]=“44”,“0.3”,thisRow.[Country ID]=“136”,“0.4”)),0))))

I am receiving this error message: Wrong argument type

RoundUp expects parameter number to be a number, a formatted number, a percentage, or a currency amount, but found [Homicide Rate]/SwitchIf([Country ID]=“9”,“0.2”,[Country ID]=“44”,“0.3”,[Country ID]=“136”,“0.4”), which is an unknown value

I understand what the error message is saying, but the thing is I want to round up the calculated value of the homicide rate divided by the values determined by the country ID… if that makes sense. As in, if my country ID number is 9, then I want to calculate my homicide rate divided by 0.2 and have that value rounded up.

But I’m getting a little stuck on how to fix the formula from here and would like some feedback. I am new to using Coda and still getting the hang of formulas. Any help is appreciated, thanks!

Why have you put quotation marks around the numbers? That makes them interpreted as text. Hopefully that’s the issue, it’s a bit hard to decipher your formula when it’s not formatted