text columns in one cell
Ok, you're missing a ")"
Here is the formula in "chunks" so that line wrap (hopefully) won't remove
the *necessary* space characters. Also note, I've made a slight change by
removing "+1" in two places:
=LEFT(A1,FIND(" ",A1)-1)&
REPT(" ",8-LEN(LEFT(A1,FIND(" ",A1)-1)))&
MID(A1,FIND(" ",A1),255)
Also of note, we can calculate which first name is the longest and build
that into the formula *but* this will add more complexity to the formula and
will make it an array formula**:
=LEFT(A1,FIND(" ",A1)-1)&
REPT(" ",MAX(LEN(LEFT(A$1:A$3,FIND(" ",A$1:A$3)-1)))
-LEN(LEFT(A1,FIND(" ",A1)-1)))&
MID(A1,FIND(" ",A1),255)
** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)
Or, you can use a helper cell to calculate the longest first name and then
refer to that cell:
B1 = array formula** :
=MAX(LEN(LEFT(A1:A3,FIND(" ",A1:A3)-1)))
Then (normally entered):
=LEFT(A1,FIND(" ",A1)-1)&
REPT(" ",B$1-LEN(LEFT(A1,FIND(" ",A1)-1)))&
MID(A1,FIND(" ",A1),255)
--
Biff
Microsoft Excel MVP
"DzEK" wrote in message ...
hi, valko
i wrote ''don't work'' because i got message - formula error !!
this is 'formula' (copy -paste)
=LEFT(A1,FIND(" ",A1)-1&REPT(" ",8-LEN(LEFT(A1,FIND("
",A1)-1))+1)&MID(A1,FIND(" ",A1)+1,255)
|