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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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