+ Reply to Thread
Results 1 to 7 of 7

Remove only characters from cells from last

  1. #1
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Post Remove only characters from cells from last

    Hello Team,

    Any excel formula which will Remove only characters from cells from last

    Example1

    Input - TEN5215ECX
    Output - TEN5215

    Suffix can have any lenght alphabets if found it should be removed after last Integer value
    Sometimes it only have integer values so there should be no action

    Example2

    Input - T 5215
    Output - T 5215

    Example3

    Input - 5215
    Output - 5215

    Any Excel formula for this, please assist
    Last edited by Parth007; 10-13-2015 at 10:12 AM.
    Regards
    Parth

    I appreciate your feedback. Hit * if u Like.
    Rules - http://www.excelforum.com/forum-rule...rum-rules.html

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Remove only characters from cells from last

    Hi Parth,

    Here is a User Defined Function (UDF) that will do what you want.
    PS: I didn't know this was a team event.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Remove only characters from cells from last

    Here is a formula solution

    in B1 and copy down

    =LEFT(A1,LOOKUP(1,-MID(A1,ROW(A$1:A$99),1),ROW(A$1:A$99)))

    Data Range
    A
    B
    1
    TEN5215ECX
    TEN5215
    2
    T 5215
    T 5215
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: Remove only characters from cells from last

    Thanks Marvin.. Its of a great help.. I have used it in a Macro file whle such occurances occur

    Alkey - Thanks to you too.. as the excel formula was also required in some reports where Functions can not be implemeneted..(Its worked like charm)

    One doubt.. it worked well...
    But gave #N/A for below Example.. sorry i missed to specify this example

    Example4

    Input - Team
    Output - Team

    here it should not do anything except keep "Team" as it is..
    puzzled if it is possible

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Remove only characters from cells from last

    OK Parth,

    Here is a little extra in the UDF to take care of the strings without numbers in them.
    Please Login or Register  to view this content.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Remove only characters from cells from last

    No problem

    Try it now

    =IFERROR(LEFT(A1,LOOKUP(1,-MID(A1,ROW(A$1:A$99),1),ROW(A$1:A$99))),A1)


    Data Range
    A
    B
    1
    TEN5215ECX
    TEN5215
    2
    T 5215
    T 5215
    3
    Team
    Team

  7. #7
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: Remove only characters from cells from last

    Grt Thanks Marvin & Alkey.... simply superb

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Remove Characters from Cells
    By shaibn in forum Excel General
    Replies: 3
    Last Post: 09-17-2015, 11:07 AM
  2. how to remove cells less than 5 characters
    By michaelmorgan9 in forum Excel General
    Replies: 1
    Last Post: 03-05-2015, 08:07 PM
  3. remove all but x characters in multiple cells
    By carmelita in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-07-2014, 07:48 AM
  4. Remove last 15 characters from all cells in a row...
    By DaddyChan in forum Excel Formulas & Functions
    Replies: 29
    Last Post: 04-15-2013, 12:21 PM
  5. [SOLVED] VBA to Remove 2nd & 3rd Characters from a Range of Cells
    By John_Day83 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-10-2013, 08:25 AM
  6. How to remove characters from cells in excel vba
    By SPstudent in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-07-2012, 11:06 PM
  7. Replies: 3
    Last Post: 06-19-2005, 07:05 PM

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