+ Reply to Thread
Results 1 to 6 of 6

Extracting data after last dot(.) or comma(,)

  1. #1
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2024
    Posts
    1,384

    Extracting data after last dot(.) or comma(,)

    Hi,
    The nature of data is similar to it at posthttps://www.excelforum.com/excel-pro...-brackets.html ,I have another things to extract that is the data after last dot(.) or comma(,) if exists,else leave intact.Workbook is enclosed for your kind reference.Here,data is the original worksheet & required is the output worksheet.However the result is required in the same worksheet and not is seperate worksheet which have already done in above link as contributed by forum contributor "Jindon"
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: Extracting data after last dot(.) or comma(,)

    review your last time have include extracting numeric require, try below code:
    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Extracting data after last dot(.) or comma(,)

    Please Login or Register  to view this content.
    Last edited by jindon; 12-09-2017 at 07:44 AM.

  4. #4
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2024
    Posts
    1,384

    Re: Extracting data after last dot(.) or comma(,)

    In the above attachment,the code does not extract the last data i.e D8 which has a dot(.) as mentioned in required worksheet.

    Secondly,column C & D data is omitted/deleted rather than shifting right hand side which you have done in earlier post when the code is run.

    Thirdly,when I run your code in my original workbook, a run time error '9' occurs.subscript out of range, & on debug at line 10 yellow highlight shows at "ar(i, 1) = Trim(t(0))" also prompt an error "can't execute code in break mode"

    I hope this will take into consideration & will revise accordingly.
    Thanx once again for your valuable time to my post .
    Last edited by paradise2sr; 12-09-2017 at 07:37 AM.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Extracting data after last dot(.) or comma(,)

    Formula spelling
    In C2

    =SUBSTITUTE(LEFT(B2,IFERROR(SEARCH(",",B2)-1,LEN(B2))),".","")

    In D2

    =SUBSTITUTE(RIGHT(B2,IFERROR(LEN(B2)-SEARCH(",",B2),0)),".","")

    then drag down
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2024
    Posts
    1,384

    Re: Extracting data after last dot(.) or comma(,)

    Quote Originally Posted by jindon View Post
    Please Login or Register  to view this content.

    Thanx your code did a fantastic works.My problem has now been solved as usual with your kind help.

+ 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. Replies: 6
    Last Post: 10-17-2017, 07:31 AM
  2. [SOLVED] Extracting information from a comma separated list of values in one cell
    By cardiff in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2012, 09:17 PM
  3. Extracting Numbers Before and After A Comma
    By treeantz in forum Excel General
    Replies: 6
    Last Post: 07-16-2012, 09:21 PM
  4. Extracting data from a cell to the right of a comma
    By kufta4 in forum Excel General
    Replies: 4
    Last Post: 12-17-2011, 07:46 PM
  5. help extracting comma separated data
    By tn80 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-07-2008, 11:30 PM
  6. Extracting Comma Seperated data into individual Cells
    By Rmcnaught in forum Excel General
    Replies: 2
    Last Post: 07-18-2006, 04:04 PM
  7. Extracting comma seperated data to new sheet
    By Rmcnaught in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-17-2006, 04:18 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