+ Reply to Thread
Results 1 to 8 of 8

truncating text

  1. #1
    scott_cairns
    Guest

    truncating text

    hello

    i would like to create a cell that truncates the titles of books to 16
    characters and no spaces.

    so for instance if A1 reads "The Religions of India", I would B1 to read
    "thereligionsofin" ... no uppercase and no spaces.

    I realise that excel may not be the best place to manipulate data like this,
    but is it possible? thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Scott,

    Try this,

    =LOWER(MID(SUBSTITUTE(A1," ",),1,16))

    Where A1 is your text,

    Does that help?

    Steve

  3. #3
    Bondi
    Guest

    Re: truncating text

    Hi,

    You could use something like this:

    =TRIM(LOWER(SUBSTITUTE("The Religions Of India"," ","")))

    Regards,
    Bondi


  4. #4
    Dave O
    Guest

    Re: truncating text

    Absolutely possible: with your title in cell A1, for instance,
    =MID(LOWER(SUBSTITUTE(A1," ","")),1,16)

    SUBSTITUTE removes all the blanks, LOWER converts to lower case, and
    MID returns the first 16 characters.


  5. #5
    scott_cairns
    Guest

    Re: truncating text

    works perfect! thanks!

    "SteveG" wrote:

    >
    > Scott,
    >
    > Try this,
    >
    > =LOWER(MID(SUBSTITUTE(A1," ",),1,16))
    >
    > Where A1 is your text,
    >
    > Does that help?
    >
    > Steve
    >
    >
    > --
    > SteveG
    > ------------------------------------------------------------------------
    > SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
    > View this thread: http://www.excelforum.com/showthread...hreadid=540663
    >
    >


  6. #6
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    You're welcome.

    Steve

  7. #7
    Anoop George
    Guest

    Re: truncating text

    Please try this this is more simplified

    =LOWER(SUBSTITUTE(A1," ",""))

    Thanks
    Anoop
    "SteveG" wrote:

    >
    > Scott,
    >
    > Try this,
    >
    > =LOWER(MID(SUBSTITUTE(A1," ",),1,16))
    >
    > Where A1 is your text,
    >
    > Does that help?
    >
    > Steve
    >
    >
    > --
    > SteveG
    > ------------------------------------------------------------------------
    > SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
    > View this thread: http://www.excelforum.com/showthread...hreadid=540663
    >
    >


  8. #8
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Anoop,

    The OP asks to return only the first 16 characters of the text, your post will return all characters so although it is a simpler formula, it won't produce the desired results. Adding the MID function allows the formula to return a specified number of characters.


    Regards,

    Steve

+ 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