Results 1 to 16 of 16

Extracting Numbers from text

Threaded View

  1. #11
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Extracting Numbers from text

    The most versatile way is to use VBa.

    Try this UDF
    Function SumCell(rng As Range)
        Dim strtmp As String
        Dim n As Long
        
        For n = 1 To Len(rng)
            If Asc(Mid(rng, n, 1)) >= 48 And Asc(Mid(rng, n, 1)) <= 57 Then
                strtmp = strtmp & Mid(rng, n, 1)
            Else
                strtmp = strtmp & " "
            End If
        Next
        strtmp = WorksheetFunction.Trim(strtmp)
        SumCell = Evaluate(Replace(strtmp, " ", "+"))
        
    End Function
    Use in worksheet
    Formula: copy to clipboard
    =SumCell(A3)
    Attached Files Attached Files
    Last edited by Marcol; 12-10-2012 at 10:51 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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