custom formatting [green]#

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
If I custom format a cell using >> [green] # << code, if I type 100, I will get 100 in green. If I type -100, I will get -100 in green,, but If I type "Hello", I will get the same Hello. If I type 0, I will get nothing (empty/hide) cell. My question, why 0 is not showing? while the text is showing? I do not have any formatting for Text? I understand the formatting sequence as the following:

Positive number; Negative number, Zero, Text

If I have [green] #

that means I do not have any coding for Zero and Text as well, then why the text did not disappear? only Zero disappeared? to be honest I also think when I type -100, this should not show up because I did not have any formatting for negative numbers as well. but lets focus on the zero and text.

Thank you very much.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
37,484
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Does it work the way you want if you change the # symbol into a 0 (zero)?
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
59,500
Office Version
  1. 365
Platform
  1. Windows
Note that in addition to doing it this way, you can also use Conditional Formatting, i.e.
have a CF rule something like:
=ISNUMBER(A1)
and choose the green font color formattint option.
 

Forum statistics

Threads
1,144,370
Messages
5,723,964
Members
422,529
Latest member
mbilal429

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