Results 1 to 5 of 5

Thread: Search a last digit e.g 0 and trim to give rest

  1. #1
    Member
    Join Date
    Apr 2011
    Posts
    69
    Rep Power
    14

    Search a last digit e.g 0 and trim to give rest

    I am looking for a formula which searches last digit, 0 in this case, and separates the the number after 0 in next cell as below


    Number Required
    1000000092 92
    1000000183 183
    1000001184 1184
    1000021184 21184

    kindly assist
    ----
    excel_learner
    (Using XL 2007 & 2010)

    -------Learning never stops!

  2. #2
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi,

    try

    =--MID(A2,MATCH(2,INDEX(1/(--MID(A2,ROW(INDEX(A:A,1):INDEX(A:A,LEN(A2))),1)=0), 0,0))+1,255)
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  3. #3
    Member
    Join Date
    Apr 2011
    Posts
    69
    Rep Power
    14
    Thanks, but i think i did not realise there are zeros in the rest of the numbers as well for which the above formula gives error, sorry for that...

    1000000820 #VALUE!
    1000001730 #VALUE!
    1000002640 #VALUE!
    1000002640 #VALUE!
    1000000820 #VALUE!
    1000001730 #VALUE!
    1000003550 #VALUE!
    1000000820 #VALUE!
    1000001730 #VALUE!
    1000002640 #VALUE!
    1000004460 #VALUE!
    1000005370 #VALUE!
    1000006280 #VALUE!
    1000005370 #VALUE!
    ----
    excel_learner
    (Using XL 2007 & 2010)

    -------Learning never stops!

  4. #4
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi

    If the format is like 10000##### then

    =--MID(A2,5,255)

    would suffice.
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  5. #5
    Member
    Join Date
    Apr 2011
    Posts
    69
    Rep Power
    14
    this works ok, thanks
    ----
    excel_learner
    (Using XL 2007 & 2010)

    -------Learning never stops!

Similar Threads

  1. Trim all Cells in a Worksheet - VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 6
    Last Post: 08-21-2015, 08:22 AM
  2. Search form on work sheet
    By Ryan_Bernal in forum Excel Help
    Replies: 5
    Last Post: 01-15-2013, 11:46 AM
  3. Search word in different workbooks and sheets
    By k0st4din in forum Excel Help
    Replies: 5
    Last Post: 11-29-2012, 10:10 PM
  4. Trim Text after 3rd Underscore but retain format
    By trankim in forum Excel Help
    Replies: 4
    Last Post: 05-13-2012, 10:44 AM
  5. VBA Function to Search in Array
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 04-10-2012, 11:34 AM

Posting Permissions

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