+ Reply to Thread
Results 1 to 6 of 6

Programming a formula to abbreviate text titles

  1. #1
    Forum Contributor
    Join Date
    04-13-2011
    Location
    Havant, Hants, England
    MS-Off Ver
    Excel 2010
    Posts
    116

    Programming a formula to abbreviate text titles

    Hi, I'm trying to abbreviate some titles to show only the first word using the LEFT and FIND formula with =LEFT(B2,FIND(" ",B2)-1). I can do it using the formula in the worksheet but don't know how best to programme this to run it as a bit of code. I attach my file showing the data I want to modify and a macro where I can put the equation into another cell and get the desired result. However, there must be a neater way to do this and directly edit and replace the current titles.

    thanks for any help,

    regards, Neil
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Programming a formula to abbreviate text titles

    Try this...

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    04-13-2011
    Location
    Havant, Hants, England
    MS-Off Ver
    Excel 2010
    Posts
    116

    Re: Programming a formula to abbreviate text titles

    Hi, thanks that works. The one improvement I'd like to make is to do it as a "one step process" replacing the current value in the cell. I can see that I could then copy and paste this into the original cell but is there a smarter way to do this so that the code replaces the original title with the abbreviated one - in one step? thanks, Neil

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Programming a formula to abbreviate text titles

    Try this...

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-13-2011
    Location
    Havant, Hants, England
    MS-Off Ver
    Excel 2010
    Posts
    116

    Red face Re: Programming a formula to abbreviate text titles

    Works a treat, thanks, very much, Neil

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Programming a formula to abbreviate text titles

    Glad it helps you and thanks for the feedback

+ 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