ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Align Left and Right in Same Cell (https://www.excelbanter.com/excel-discussion-misc-queries/173632-align-left-right-same-cell.html)

Sloth

Align Left and Right in Same Cell
 
I am trying to align the first names to the left of the cell and the last
names to the right (don't ask me why). I know one way but it requires a
custom number format for each entry. Is the another method anyone here can
suggest to get the same thing without using a custom number format.

Here's how I currently do it.
Say I want "Patrick Stewart" to look like this...
Patrick Stewart
I enter Patrick in the cell and then apply the following custom number
format..
@* "Stewart"
and align the cell to the left.
the "* " tells excel to enter as many spaces as it can to fill the cell.

This method works if I have one or two names in the list I want to do this
with, but it gets cumbersome after more than a handful.

ExcelBanter AI

Answer: Align Left and Right in Same Cell
 
Yes, there is another method you can use to align the first names to the left and the last names to the right in the same cell. Here are the steps:
  1. Enter the first and last names in the same cell, separated by a space.
  2. Highlight the cell or cells you want to format.
  3. Click on the "Home" tab in the ribbon.
  4. Click on the "Alignment" group.
  5. Click on the "Align Text Left" button to align the text to the left.
  6. Click on the "Format Cells" button in the "Number" group.
  7. Click on the "Alignment" tab in the "Format Cells" dialog box.
  8. Check the box next to "Merge cells" under the "Horizontal" section.
  9. Click on the drop-down menu next to "Horizontal" and select "Right (Indent)".
  10. Click "OK" to close the "Format Cells" dialog box.

This will align the first name to the left and the last name to the right in the same cell. The "Right (Indent)" option will indent the text to the right of the cell, creating the desired effect. This method is more efficient than using a custom number format for each entry, especially if you have a large number of entries to format.

Bernard Liengme

Align Left and Right in Same Cell
 
Why not have first-name in A and second-name in B ?
You can hide the gridlines!
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Sloth" wrote in message
...
I am trying to align the first names to the left of the cell and the last
names to the right (don't ask me why). I know one way but it requires a
custom number format for each entry. Is the another method anyone here
can
suggest to get the same thing without using a custom number format.

Here's how I currently do it.
Say I want "Patrick Stewart" to look like this...
Patrick Stewart
I enter Patrick in the cell and then apply the following custom number
format..
@* "Stewart"
and align the cell to the left.
the "* " tells excel to enter as many spaces as it can to fill the cell.

This method works if I have one or two names in the list I want to do this
with, but it gets cumbersome after more than a handful.




Tyro[_2_]

Align Left and Right in Same Cell
 
You can apply your format to the first cell and then use format painter and
drag it down to apply to all cells.

Tyro

"Sloth" wrote in message
...
I am trying to align the first names to the left of the cell and the last
names to the right (don't ask me why). I know one way but it requires a
custom number format for each entry. Is the another method anyone here
can
suggest to get the same thing without using a custom number format.

Here's how I currently do it.
Say I want "Patrick Stewart" to look like this...
Patrick Stewart
I enter Patrick in the cell and then apply the following custom number
format..
@* "Stewart"
and align the cell to the left.
the "* " tells excel to enter as many spaces as it can to fill the cell.

This method works if I have one or two names in the list I want to do this
with, but it gets cumbersome after more than a handful.




Sloth

Align Left and Right in Same Cell
 
Well I am trying to do a list like this (I hope the aligning comes through)

Jack Thompson
Patrick Stewart
Tom Reallylonglastname
Longfirstname lastname

basically I want the long names to extend into the other columns. Your
method ends up like this. It's not a "bad" thing, it just isn't what I want
for this particular list.

Jack Thompson
Patrick Stewart
Tom Reallylonglastname
Longfirstname lastname


"Bernard Liengme" wrote:

Why not have first-name in A and second-name in B ?
You can hide the gridlines!
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Sloth" wrote in message
...
I am trying to align the first names to the left of the cell and the last
names to the right (don't ask me why). I know one way but it requires a
custom number format for each entry. Is the another method anyone here
can
suggest to get the same thing without using a custom number format.

Here's how I currently do it.
Say I want "Patrick Stewart" to look like this...
Patrick Stewart
I enter Patrick in the cell and then apply the following custom number
format..
@* "Stewart"
and align the cell to the left.
the "* " tells excel to enter as many spaces as it can to fill the cell.

This method works if I have one or two names in the list I want to do this
with, but it gets cumbersome after more than a handful.





Sloth

Align Left and Right in Same Cell
 
all the names are different so they can't have the same format.

"Tyro" wrote:

You can apply your format to the first cell and then use format painter and
drag it down to apply to all cells.

Tyro

"Sloth" wrote in message
...
I am trying to align the first names to the left of the cell and the last
names to the right (don't ask me why). I know one way but it requires a
custom number format for each entry. Is the another method anyone here
can
suggest to get the same thing without using a custom number format.

Here's how I currently do it.
Say I want "Patrick Stewart" to look like this...
Patrick Stewart
I enter Patrick in the cell and then apply the following custom number
format..
@* "Stewart"
and align the cell to the left.
the "* " tells excel to enter as many spaces as it can to fill the cell.

This method works if I have one or two names in the list I want to do this
with, but it gets cumbersome after more than a handful.





Dupatt

Align Left and Right in Same Cell
 
I am not an expert and I am not sure that this is a proper fix for your
problem but it works.

At the top of the column that will contain your names, click to highlight
the whole column, then right click and chose format cells, Alignment, on
Horizontal select Distributed(Indent). Go back and right click the
highlighted column again and select "column width" and set it for the
longest name you expect to have (this can be changed if you find you have
longer names later).
The column will adjust for the shorter names but it will wrap for longer
ones.
Just another user of Excel 2003.
Pat
--


Living life is like drawing without an eraser!

"Sloth" wrote in message
...
I am trying to align the first names to the left of the cell and the last
names to the right (don't ask me why). I know one way but it requires a
custom number format for each entry. Is the another method anyone here
can
suggest to get the same thing without using a custom number format.

Here's how I currently do it.
Say I want "Patrick Stewart" to look like this...
Patrick Stewart
I enter Patrick in the cell and then apply the following custom number
format..
@* "Stewart"
and align the cell to the left.
the "* " tells excel to enter as many spaces as it can to fill the cell.

This method works if I have one or two names in the list I want to do this
with, but it gets cumbersome after more than a handful.





All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com