Minus decimal places from number after 4 decimal places

micfoste10

New Member
Joined
Aug 25, 2015
Messages
9
hi,

I have a number 5133.159699999999 I would like to extract or minus all the digits after the 4th decimal place.

i.e. 99999999 - the problem I have is the list of numbers I need to do this for has differing number of decimal places.

how can I do this please?
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
How about
Excel Formula:
=ROUNDDOWN(A2,4)
 
Upvote 0
But I suspect the better answer is 5133.1597. I suspect the ****69999999 is simply the result of binary arithmetic anomalies.

In general, when you expect accuracy to some number of decimal places (4), it is prudent to explicitly round (not round up or round down) to that number of decimal places, and not to an arbitrary number of decimal places, as some people suggest. To that end:

=ROUND(A2, 4)
 
Upvote 0
I need to extract the numbers after the 4 decimal places - so I need in the example 99999999, the round option only gives me the whole number and the 4 dp. How do I extract the numbers after that?
 
Upvote 0
Code:
=TRUNC(A1, 4)
and format cells to numbers, 4 decimals
 
Upvote 0
I need to extract the numbers after the 4 decimal places - so I need in the example 99999999, the round option only gives me the whole number and the 4 dp. How do I extract the numbers after that?

I have no idea why you would want this but the closest I can get is below.
The issue is that every mathematical operation changes the number that you seem to be trying to isolate.
There was a suggestion in one of the forums to use the "General" format but it seems to be limited to 8 decimal places.

Excel Formula:
=VALUE(RIGHT(TEXT(A1,"0."&REPT("#","15")),
LEN(TEXT(A1,"0."&REPT("#","15")))-FIND(".",TEXT(A1,"0."&REPT("#","15")))-4))
 
Upvote 0
I need to extract the numbers after the 4 decimal places - so I need in the example 99999999

Um, okay. But your title says "minus decimal places from...", and your original description is ``I would like to extract or minus all the digits after...``. The word "minus" can be interpreted as "subtract from".

So, perhaps you can understand why @Fluff suggested ROUNDDOWN, which effectively subtracts 0.00009999999 from 5133.15969999999 (7 nines, not 8, BTW).


the round option only gives me the whole number and the 4 dp. How do I extract the numbers after that?

It is unclear whether you want 9999999 as a number or as text, or even 0.00009999999.

I would recommend a text result. Otherwise, we cannot distinguish the "excess" fractional digits in 5133.159699 from 5133.15960000009, for example.

To that end, you might use the following (A1 is the original value, 5133.15969999999):

=MID(TEXT(A1, "0."&REPT("#",127)), 5+FIND(".", TEXT(A1, "0."&REPT("#",127))), 127)

(Apparently, 127 is the max number of decimal places that Excel allows in that form.)

However, the range and form of the original values are unclear. It might be helpful to have more examples, as well as an explanation of: (a) the circumstances that result in 5133.15969999999; (b) why you want to extract the "excess" fractional digits; and (c) what you would want when there are (arguably) fewer "legitimate" fractional digits.

(For example, would you consider 51331.5969999999 to be 51331.596 with "excess" fractional digits 0.0009999999; or 51331.5969 with "excess" 0.0000999999? What if I told you that the origin is the same, simply scaled up by 10?

In fact, I wonder if there is a "typo" in your original posting, and you intended the example to be 5133.95709999999 (!).

I know: that's one heckuva of typo. But assuming that the intended value of the original example (as written) is 5133.1597, it seems like an unlikely coincidence that a rearrangement of those digits -- 5133.9571 -- exposes the relatively unusual Excel formatting defect that displays it as 5133.95709999999 and that actually changes it to the binary approximation of 5133.95709999999 in some circumstances. Perhaps you simply posted the wrong example.

In any case, it might be more productive (for your benefit) to discuss how to deal with whatever the circumstances are, instead of how to separate the "excess" fractional digits, one way or another.
 
Upvote 0
Unless you mean the result of this.
Code:
=MID(A1, FIND(".", A1)+5,99)
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,449
Members
448,966
Latest member
DannyC96

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