Formatting numbers in TEXT

lotakov

New Member
Joined
Aug 28, 2012
Messages
3
I use this formula:
=" "&TEXT(COUNTIF(G5:G22,"appr"),"000")&" "&TEXT(COUNTIF(I5:I22,"appr"),"000")&" "&TEXT(COUNTIF(G5:G22,"appr")+COUNTIF(I5:I22,"appr"),"000")
to display numbers in a merged cell.
The "000" formatting seems to be the only one which keeps positions intact, but it displays leading zeroes, so I have it as " 001 023 004" etc... Is there a formatting option to display blanks in place of zeroes, but keeping number position as it does with "000", so it would look like: " ^^1 ^23 ^^4", etc..?
Thank you very much.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi
Welcome to the board

Yes, you can use the ?, like in

=TEXT(A1,"??0")

... but, since in most fonts the caracters have variable width you may not get the result you want, unless you use a monospaced font, like Courier or Courier New.

Please try.
 
Upvote 0
Thank you, PGC.
Unfortunately, this does not work.
It shifts the sugnificant digit and disturbs entire alignment.
What I need is leading zeroes replaced by equal number of leading spaces, so the sugnificant digit(s) does not move.
 
Upvote 0
Hi

As I posted, I believe that in this case it will only work if you use a monospace font.

Try the following. Use format I posted in some cells and then change their font to Courier New.
 
Upvote 0
Hi

As I posted, I believe that in this case it will only work if you use a monospace font.

Try the following. Use format I posted in some cells and then change their font to Courier New.

Hi, PGC.

Fascinating! Looks like this will work! What are monospace fonts? I am using Courier and it looks good.

Thank you very, very much.
Yuri.
 
Upvote 0
I'm glad it helped. Thanks for the feedback.

Another one you may try is Lucida Console.
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,458
Members
452,915
Latest member
hannnahheileen

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