+ Reply to Thread
Results 1 to 6 of 6

How to extract Fist number, Last number from string and SUM

  1. #1
    Registered User
    Join Date
    12-29-2011
    Location
    ShangHaii, China
    MS-Off Ver
    Excel 2003, 2010
    Posts
    30

    How to extract Fist number, Last number from string and SUM

    How to extract Fist number and last number like this, please see attached file, thanks!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-29-2011
    Location
    ShangHaii, China
    MS-Off Ver
    Excel 2003, 2010
    Posts
    30

    Re: How to extract Fist number, Last number from string and SUM

    Who can help me????

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: How to extract Fist number, Last number from string and SUM

    Hi,

    a first attempt: it should work when the strings contain capital letters (A C X ) and numbers.


    In F2 to be confirmed with control+shift+enter:


    Please Login or Register  to view this content.
    In G2 to be confirmed with control+shift+enter:

    Please Login or Register  to view this content.

    Hope you'd get better solutions

    Regards


    Edit:small example attached ; I've used only integers, Italian settings could not recognize as numbers 1.07 1000.75
    Attached Files Attached Files
    Last edited by canapone; 05-07-2012 at 03:18 AM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Registered User
    Join Date
    12-29-2011
    Location
    ShangHaii, China
    MS-Off Ver
    Excel 2003, 2010
    Posts
    30

    Re: How to extract Fist number, Last number from string and SUM

    Thank you so much for your help!
    But that is sample data, original data has more 1000 rows. who can hepl me write CODE VBA?

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

    Re: How to extract Fist number, Last number from string and SUM

    UDF

    F2:
    =SumNumbers($B2:$E2,TRUE)
    G2:
    =SumNumbers($B2:$E2,FALSE)

    then filldown
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-29-2011
    Location
    ShangHaii, China
    MS-Off Ver
    Excel 2003, 2010
    Posts
    30

    Re: How to extract Fist number, Last number from string and SUM

    @Jindon : I want to say with you "Thank you very much". It's wonderful!

+ 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