Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format Zero Percent to Show "-"

Status
Not open for further replies.

GSCaupling

Technical User
Sep 5, 2008
296
US

I have a form field that is a percent. When I format as a Percent it allows whole numbers to be entered and still displays them as percentages (e.g., entering "25" results in "25%" rather than 2500).

However, when the value is zero I do not want to see "0". I would prefer to see see a hyphen or nothing at all.

I tried the format "[blue]#%;(#%)[Red];- ;-[/blue]" and it gives me the hyphen for zeroes. However, "25" now becomes 2500%.

Can't it do both? Can anyone advise of a custom format that displays zero values as a hyphen or blank while still allowing the user to input whole numbers without the decimal place?

Many thanks,
GS

[Green]******^*******
[small]I[/small] [small]Hate[/small] [♥] [small]Ambiguity.[/small][/green]
 
Thanks Duane. I thought there might be an easier way, but I'll give it a shot. Some of the percentages are over 100, so this should be fun.

GS

[Green]******^*******
[small]I[/small] [small]Hate[/small] [♥] [small]Ambiguity.[/small][/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top