custom formatting

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I want to write a custom formatting code to do the following:

user enterexcel shows
11
200200
10001 k
12451.245 k
5555

<tbody>
</tbody>

Is that possible? Thank you very much
 
Last edited:

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
If you won't mind exact number of kilos (e.g., 8000) displaying with a trailing decimal point (i.e., 8. k), then you can use this custom format...

[>=1000]0.####, k

where you would put as many # signs as maximum decimal places you are willing to display.

If you would not mind trailing zeros (e.g., 8.000 k), you could use this instead...

[>=1000]0.000, k

where you put put as may zeros after the decimal point as the maximum number of decimal places you want to always display.
 
Upvote 0
Experiment with the following format
Code:
[>=1000]#.##0," k";[<=-1000]-#.##0," k";#,##0.###

..::Edit Eh, I didn't see Rick's post ::..

Artik
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

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