#1   Report Post  
LoganStallworth
 
Posts: n/a
Default Number Format


Is there a way I can format a number so that significant 0's and a
letter are conditional?

I currently use:

?0"g" ?0"s" ?0"c" - which formats like so:

100000 = 10g 00s 00c
100010 = 10g 00s 10c
1000 = 0g 10s 00c


What I wish to have is a code that formats like so:

101010 = 10g 10s 10c
10000 = 10s
10 = 10c
100010 = 10g 10c


Is this possible?


--
LoganStallworth
------------------------------------------------------------------------
LoganStallworth's Profile: http://www.excelforum.com/member.php...o&userid=27561
View this thread: http://www.excelforum.com/showthread...hreadid=471534

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Try a format of

[9999]0"g "00"s "00"c";[99]00"s "00"c";0"c"

--

HTH

RP
(remove nothere from the email address if mailing direct)


"LoganStallworth"
<LoganStallworth.1w34uc_1127937906.0147@excelfor um-nospam.com wrote in
message news:LoganStallworth.1w34uc_1127937906.0147@excelf orum-nospam.com...

Is there a way I can format a number so that significant 0's and a
letter are conditional?

I currently use:

?0"g" ?0"s" ?0"c" - which formats like so:

100000 = 10g 00s 00c
100010 = 10g 00s 10c
1000 = 0g 10s 00c


What I wish to have is a code that formats like so:

101010 = 10g 10s 10c
10000 = 10s
10 = 10c
100010 = 10g 10c


Is this possible?


--
LoganStallworth
------------------------------------------------------------------------
LoganStallworth's Profile:

http://www.excelforum.com/member.php...o&userid=27561
View this thread: http://www.excelforum.com/showthread...hreadid=471534



  #3   Report Post  
LoganStallworth
 
Posts: n/a
Default


That works very well. I appreciate it, but may I ask for one more
thing.

I now know that you can use ; and [] for something of an if/then
statement, but how do I do something that will not put 00c, but will
put 10c if there is something in the ten and ones place?


--
LoganStallworth
------------------------------------------------------------------------
LoganStallworth's Profile: http://www.excelforum.com/member.php...o&userid=27561
View this thread: http://www.excelforum.com/showthread...hreadid=471534

  #4   Report Post  
LoganStallworth
 
Posts: n/a
Default


Also. Why is it that

[9999]0"g "00"s "00"c";[99]00"s" 00"c";[0]#0"c";[Red]0"c"

is invalid?


--
LoganStallworth
------------------------------------------------------------------------
LoganStallworth's Profile: http://www.excelforum.com/member.php...o&userid=27561
View this thread: http://www.excelforum.com/showthread...hreadid=471534

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number format exactly the same, displays differently in some cells eider Excel Discussion (Misc queries) 1 July 29th 05 12:26 AM
Number format for Combobox MBlake Excel Discussion (Misc queries) 1 June 29th 05 03:25 AM
I want to format a number cell without the decimal and without ro. LAM Excel Discussion (Misc queries) 8 April 20th 05 04:59 PM
16 digit number wont keep alteration unless format cell to text Croc001 Excel Discussion (Misc queries) 3 March 30th 05 09:12 AM
How do i change numbers in text format to number format? Greg New Users to Excel 1 December 14th 04 05:22 PM


All times are GMT +1. The time now is 05:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"