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:

[TABLE="class: outer_border, width: 300"]
<tbody>[TR]
[TD]user enter[/TD]
[TD]excel shows[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]200[/TD]
[TD]200[/TD]
[/TR]
[TR]
[TD]1000[/TD]
[TD]1 k[/TD]
[/TR]
[TR]
[TD]1245[/TD]
[TD]1.245 k[/TD]
[/TR]
[TR]
[TD]55[/TD]
[TD]55[/TD]
[/TR]
</tbody>[/TABLE]

Is that possible? Thank you very much
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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,223,705
Messages
6,173,985
Members
452,540
Latest member
haasro02

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