Formula to convert anything above decimal 7 to 9

Hiten Vakharia

Board Regular
Joined
Sep 25, 2013
Messages
66
Hi,

I would like to convert the decimal which is equal or higher than .70 to .99

For eg.
12.75 changes to 12.99
10.82 changes to 10.99
else all the other figures remains unchanged
10.39 does not change
19.69 does not change

Thanks in advance
Hiten
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I would like to convert the decimal which is equal or higher than .70 to .99

For eg.
12.75 changes to 12.99
10.82 changes to 10.99
else all the other figures remains unchanged
10.39 does not change
19.69 does not change
Here is one way to do it...

=IF(MOD(A1,1)>=0.7,INT(A1)+0.99,A1)
 
Upvote 0
Here is one way to do it...

=IF(MOD(A1,1)>=0.7,INT(A1)+0.99,A1)


Many thanks, that worked.

Just one thing more, in addition to this I would like to change the last digit to 9 where there it is below 7
eg.
12.50 changes to 12.59 (last digit changes to 9)
12.75 changes to 12.99 (as per the above formula)
11.83 changes to 11.99 (as per the above formula)
23.52 changes to 23.59 (last digit changes to 9

Regards,
Hiten
 
Upvote 0
Maybe this:

=IF(MOD(A1,1)>=0.7,INT(A1)+0.99,(INT(A1*10)+0.9)/10)

Or

=TRUNC(A1,MOD(A1,1)<0.7)+(MOD(A1,1)>=0.7)*0.9+0.09

Markmzz
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top