right justify text ot columns?

J

judoist

I have a column with lots of figures ranging between one and fou
digits. I want to place digits into separate columns using text t
columns but right justified. I thought right justifying the figure
first then using text to columns would work but everything stil
appears left justified. Any suggestions
 
A

Andy B

Hi

The justification of a cell is just cosmetic. You can use Text to Columns
whatever the formatting is. An alternative is to use formulas:

=MID(A1,1,1)
=MID(A1,2,1)
=MID(A1,3,1) etc
Once done, if you want it right-justified, just format it as such.
 
J

judoist

Thanks, but not quite what i meant.

As an example, lets say all my figures ranging from 1 to four digit
are in column one. Columns 2 to 5 will be where the results will b
displayed once i have used text to columns to separate each number int
an individual digit. So number 3254 in column one would be 3(in colum
2), 2 in column three, 5 in column 4 etc. Number 24 in column one woul
be 2 in column two and 4 in column three.

I'm trying to get Excel to shift everything to the right so number 2
is displayed as 2 in column 4 and 4 in column five. If the number was
it would show as 1 in column five.

Natha
 
A

Andy B

Hi

Try these:
Col 2
=IF(LEN(A1)>3,MID(LEN(A1)-3,1,1),"")
Col 3
=IF(LEN(A1)>2,MID(A1,LEN(A1)-2,1),"")
Col 4
=IF(LEN(A1)>1,MID(A1,LEN(A1)-1,1),"")
Col 5
=RIGHT(A1,1)
 
J

judoist

Hi again

Doesn't seem to be working. I use Excel 2000. Do you think that migh
have something to do with it?

Natha
 
A

Andy B

No - because I use XL2000 too!! What does it do - or what doesn't it do? It
works OK for me - with your data in A1. What results are you getting?
 
D

David McRitchie

I expect that you would get False out of testing such cells
as numbers =ISNUMBER(D3)

Try using the TRIMALL macro on your "numbers"
http://www.mvps.org/dmcritchie/excel/join.htm#trimall

Before using TRIMALL suggest changing the cell format to what you
want (forget about right justify) and specifically make sure they
are not formatted as text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top