+ Reply to Thread
Results 1 to 4 of 4

Making all text strings the same length

Hybrid View

  1. #1
    Registered User
    Join Date
    07-25-2008
    Location
    Asheville, NC
    Posts
    16

    Making all text strings the same length

    I have a range A2:A50, each cell contains a different string of text. The longest of these strings is 34 characters (I used the =len() function). I would like to add spaces to the end of every other string in order to bring them up to 34 characters as well. Is there a way to do this without going through each cell and adding in the specific spaces. I will be copy/pasting this range into a another program and it is much easier to read if all text strings are the same length.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,698
    Try this formula in B2 copied down

    =LEFT(A2&REPT(" ",34),34)

    You can then copy the range B2:B50 and use Edit > Paste special > values to copy over column A

  3. #3
    Registered User
    Join Date
    07-25-2008
    Location
    Asheville, NC
    Posts
    16
    That worked perfectly, thanks again!

  4. #4
    Registered User
    Join Date
    03-29-2012
    Location
    Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Making all text strings the same length

    Is it possible to measure visual length of a cell? Suppose i've data like below...

    My data i like to have them
    ColA ColB ColC
    iiiii .89 iiiii-----.89
    zzzzz .65 zzzzz--.65

    that means every cells text length will be visually same.
    Last edited by Majharul; 11-12-2014 at 07:49 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1