Round up Formula help

Copper Contributor

Hi, I have been using this formula for cost a calculation but there is an error i would like to correct.

=IF(MOD(100,C13)>1,ROUNDUP(C13*2,-1)-1,(C13-1))

Error:  if the original value is 50 the answer i get is 49 not 99.

 

The formula should double a numeric value, then round it up to nearest whole multiple of 10, then minus 1 to get the answer.

Example 1: A value of 73.68 would equate to an answer of 149.00.

Example 2: A value of 53.17 would equate to an answer of 109.00.

Example 3: A value of 50.00 would equate to an answer of 99.00.

Example 4: A value of 263.12 would equate to an answer of 529.00.

 

 

 

2 Replies

Hello @McBee83,

 

 Your formula was very close to being correct. The corrections are marked in red:

=IF(MOD(C13,100)>1,ROUNDUP(C13*2,-1)-1,(C13-1))

@McBee83 

As variant

image.png

=IF(INT(C13/10),INT(C13/5-0.1)*10+9,C13-1)