PLACE TEXT RIGHT: place a character to the right in same place

itr674

Well-known Member
Joined
Apr 10, 2002
Messages
1,769
I am trying to put asingle text character al the way right when using "courier new" itlines up in he same place.

The setup is:

Name cell: Last, First
Group cell: can be character two, three, or fourcharacters, and will be listed first

Using FIND to get just the LEN of Last nameand comma


Example of what Iwould like it to look like.


ABCD Last Name x

ABC Last Name x
AB LastName x
 
Last edited:

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
41,140
Office Version
365
Platform
Windows
Is this what you mean

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th><th>D</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style="color: #000000;;">ABCD</td><td style=";">Mary</td><td style=";">x</td><td style=";">ABCD      Mary      x</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style="color: #000000;;">ABC</td><td style=";">Mungo</td><td style=";">x</td><td style=";">ABC       Mungo     x</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style="color: #000000;;">AB</td><td style=";">Midge</td><td style=";">x</td><td style=";">AB        Midge     x</td></tr></tbody></table><p style="width:4.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet2</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">D2</th><td style="text-align:left">=REPLACE(<font color="Blue">REPT(<font color="Red">" ",10</font>),1,LEN(<font color="Red">A2</font>),A2</font>)&REPLACE(<font color="Blue">REPT(<font color="Red">" ",10</font>),1,LEN(<font color="Red">B2</font>),B2</font>)&C2</td></tr></tbody></table></td></tr></table><br />

PS:
It doesn't look as though it's lined up, but it will be in the sheet.
 
Last edited:

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
41,140
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
44,749
Office Version
365
Platform
Windows
If interested, here is a shorter version that I think should still do the job.

Excel Workbook
ABCD
2ABCDMaryx
ABCDMaryx
3ABCMungoxABCMungox
4ABMidgexABMidgex
Align
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
35,952
Office Version
2010
Platform
Windows
If interested, here is a shorter version that I think should still do the job.
And here is another one that is way, way shorter. :devilish:

=REPLACE(A2&REPT(" ",20-LEN(A2))&C2,11,LEN(B2),B2)
 
Last edited:

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
44,749
Office Version
365
Platform
Windows
And here is another one that is way, way shorter. :devilish:
In that case, what about? :p

=LEFT(REPLACE(A2&REPT(" ",20),11,1,B2),20)&C2
 

Watch MrExcel Video

Forum statistics

Threads
1,099,914
Messages
5,471,473
Members
406,764
Latest member
ExcelMaker007

This Week's Hot Topics

Top