Custom rounding in Display

Chartist

Board Regular
Joined
Apr 2, 2007
Messages
106
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!
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Dave Patton

Well-known Member
Joined
Feb 15, 2002
Messages
4,632
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
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
 

Watch MrExcel Video

Forum statistics

Threads
1,127,861
Messages
5,627,315
Members
416,239
Latest member
Counselor85027

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
Top