Custom rounding in Display

Chartist

Board Regular
Joined
Apr 2, 2007
Messages
138
Office Version
  1. 365
Platform
  1. Windows
I'm working with different numbers which have 6-10 digits, I only want to concentrate on 4 digits of significance. That is, only want to view the left-most 4 digits of the number. The remaining digits should be hidden if they are after the decimal, and replaced with 0 if before.

For example:
123456789 should be displayed as 123400000
0.123456789 should be displayed as 0.1234
0.0001234567 should be displayed as 0.0001234


Instead of using a formula, is this possible using a custom display right in the cell?
Thanks!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Quick thoughts with trial and error

Test202101.xlsm
ABC
1
2123456789123400000123400000
30.1234567890.1234
40.0001234570.0001234
1a
Cell Formulas
RangeFormula
C2C2=INT(A2/10^(LEN(A2)-4))*10^(LEN(A2)-4)
B2B2=INT(A2/100000)*100000
B3B3=INT(A3*10000)/10000
B4B4=INT(A4*10000000)/10000000
 
Upvote 0

Forum statistics

Threads
1,215,433
Messages
6,124,861
Members
449,194
Latest member
HellScout

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