Lose to left of decimal

bam12

Well-known Member
Joined
Dec 6, 2004
Messages
985
How do I lose anything to left of decimal and show figure as whole number

0811294.12345. Would be 12345
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Sorry about confusion. Let me explain the number sequence.
0811294.12345.

08 is region
11294 is julian date
12345 is actually a counter so has things added it increases

we need to use the counter part for a report so need all 5 digits
So if we get to 12350. Need to show it that way


TIA
 
Upvote 0
Sorry about confusion. Let me explain the number sequence.
0811294.12345.

08 is region
11294 is julian date
12345 is actually a counter so has things added it increases

we need to use the counter part for a report so need all 5 digits
So if we get to 12350. Need to show it that way


TIA
The formula I suggested does that.

Please post some examples so we know what results you expect.
 
Upvote 0
I must have did something wrong on the zero one it truncated zero and all after that were in to many digits. Maybe I have formatted wrong
 
Upvote 0
You need to format your original reference as text not a number - otherwise any formula like T.Valko's will truncate the string so something that displays like 123456.12340 will return 1234 because even if your number format is to show 5 dp in the original cell Excel only carries the significant figures internally.

A supplementary thought is that surely if the part after the decimal point is a sequence number then

123456.999

should be followed by

12456.1000

and you need to pad the front of your number with zeros otherwise you will get 999 turned into 9990 which is followed by 1000!

So I think you have to do the following:

Turn all your data into text

Drop the bit to the left of the DP using a formula like this

=(--MID(B9,FIND(".",B9)+1,LEN(B9)-FIND(".",B9)+1))

Excel will generally interpret this as a number (in 2007 and later at the least) but I think some earlier versions of Excel might need this wrapped in a VALUE function to turn the text into numbers - you need to check if you use an older version.

If I am right and 999 should display as 00999 then you can force this to happen by using a custom number format with 00000 as the code in the format field.
 
Upvote 0
811294.12344 12344
811294.12346 12346
811294.12348 12348
811294.12350 1235
811294.12352 12352
811294.12354 12354
811294.12356 12356
811294.12358 12358
2711294.12457 12457

here is sample of what i am getting
 
Upvote 0

Forum statistics

Threads
1,222,397
Messages
6,165,763
Members
451,985
Latest member
jchunowitz

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