Hi,
I have a need to put a name and a number in one cell.
(e.g. John Smith 15)
I would like the name to be left aligned and the number right aligned.
Is this possible?
Cheers, Paul.
Hi,
I have a need to put a name and a number in one cell.
(e.g. John Smith 15)
I would like the name to be left aligned and the number right aligned.
Is this possible?
Cheers, Paul.
never seen it before
why do you want this? how many cells are we looking at?
how bout the ol' insert spaces until it looks ok trick?
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
It is a fixed cell (i.e. locked with formulas) and I can add spaces but it doesn't align properly, especially going from 9 to 10.
Thee are about a dozen cells I need to do this with and I can't just add another column as it will mess up lots and lots of cells above and below. (Theorietically I guess I could, but it would take hours).
What is the formula or better a sample workbook.
I think people forget the word "THANK YOU!!!!" Do you still know it???
There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "
Regards,
Vladimir
(Where Column A is a list of names and Column B is a list of numbers)Please Login or Register to view this content.
the problem with spaces and why it doesnt align is because most fonts dont have exact same spacing for every character
Courier font however does have same spacing (monospaced font)
see attached way of doing it
also on the file i put a textbox way of doing it....it wouldnt be recommended if you have many....maybe if you have 10 or so it is ok but over that would be too much hassle to maintain i would think
Last edited by humdingaling; 12-01-2014 at 08:52 PM.
Row\Col A B C D 1John Smith 15 John*Smith 15 B1: =SUBSTITUTE(A1, " ", CHAR(160), 1)
The table above doesn't illustrate clearly, but does what you describe. The formula replaces the first space with a non-breaking space (which appears above as an asterisk, but not in Excel.)
Then set the horizontal alignment for the cell with the formula to Distributed (Indent). Make the column as wide as you like, and it will align "John Smith" left and the "15" right.
Finally, if you want, you can copy the formula cells, replace with values, and delete the original column.
Last edited by shg; 12-01-2014 at 09:14 PM.
Entia non sunt multiplicanda sine necessitate
Thanks for these suggestions. When time permits, I'll have a play with the different ways and see what suits best.
Cheers, Paul.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks