Rounding decimal

strawberrish

New Member
Joined
May 14, 2024
Messages
2
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello good day

Need help about rounding decimal based on 2nd and 3rd decimal

Example
----------
1.445

If 2nd decimal was 0,2 and 4 only
3rd decimal was 5 only

The output should be
= 1.44

-----------
1.436
If 2nd decimal was 1,3,6,7,8,9

Then 3rd decimal was 5 and above
It will be normal round.

= 1.44

If 3rd decimal was 4 below

=1.43

------

Thanks in advance

Sorry for my bad english. Im not a native english speaker
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
You didn't say if you must have a formula or could make use of a vba procedure (macro, in Excel speak). If you need a formula, then I can't help. However, I think you are missing some rules (or at least didn't say what to do in some cases).

What if the 2nd decimal is 5?

Then 3rd decimal was 5 and above
It will be normal round.
= 1.44
I'm thinking normal round would be 1.45. not 1.44. What you show looks like Banker's Rounding for that example. Is that what you want? I don't think so, because the next example is not Banker's Rounding. In fact, rounding down is not normal for the next case:
If 3rd decimal was 4 below
=1.43
Why should 1.444 round down to 1.43 instead of being 1.44? :unsure:
 
Upvote 0
You didn't say if you must have a formula or could make use of a vba procedure (macro, in Excel speak). If you need a formula, then I can't help. However, I think you are missing some rules (or at least didn't say what to do in some cases).

What if the 2nd decimal is 5?


I'm thinking normal round would be 1.45. not 1.44. What you show looks like Banker's Rounding for that example. Is that what you want? I don't think so, because the next example is not Banker's Rounding. In fact, rounding down is not normal for the next case:

Why should 1.444 round down to 1.43 instead of being 1.44? :unsure:
in the second case

1.436
If 2nd decimal was 1,3,6,7,8,9

Then 3rd decimal was 5 and above
It will be normal round.

= 1.44

If 3rd decimal was 4 below

=1.43

--------------------------------------------------------

but its all ok now ive use vba instead

by converting number to string then extracting the 2nd and 3rd decimal from string then using if not and function

Thank you all
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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