Text Alignment Formula

rhmkrmi

Active Member
Joined
Aug 17, 2012
Messages
341
Office Version
  1. 365
Platform
  1. Windows
Hello:

When I add the same text to the end of two words that have the same length, they do not look aligned even though the length is the same:

PHOTOCOPIERS OK
SHREDDERS OK

How can I align them using a formula so that OK in the second cell end at the same spot the above one does?

Thanks
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
You could right align them !
But then the issue will return at the beginning of the string !!
 
Upvote 0
The two strings do not have the same # of characters.
PHOTOCOPIER OK has 14
SHREDDERS OK has 12
 
Upvote 0
They do, I used the LEN formula and they both return 24, I have made them have equal length by adding space to the end of the texts:

PHOTOCOPIERS
SHREDDERS

Thanks
 
Upvote 0
I'm obviously missing something, if they both return LEN = 24 !!!
Maybe you need to Trim the excess spaces off them
Code:
=TRIM(A1)
 
Upvote 0
Maybe switch to a monospaced font, like Consolas or Courier.
 
Upvote 0
Thanks Michael.

What I am trying to do is to have 2 alignments in the same cell, for example, I need to have SHREDDERS left aligned and SOLD right aligned in the same cell where I have SHREDDERS SOLD.

Thanks again.
 
Upvote 0
In that case, set the horizontal alignment to Distributed.
 
Upvote 0
Thanks.

It works for cells where I have two words only but where there is more than 2, I cannot get the word SOLD aligned seperately, I want to right align one word (which is SOLD) and keep the rest to te left.

Thank you.
 
Upvote 0

Forum statistics

Threads
1,215,809
Messages
6,127,010
Members
449,351
Latest member
Sylvine

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top