+ Reply to Thread
Results 1 to 3 of 3

Extracting numbers from multiple cells in a range

  1. #1
    Registered User
    Join Date
    12-10-2010
    Location
    Oklahoma, USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Red face Extracting numbers from multiple cells in a range

    So I need to extract numbers from multiple cells withing a range, having added them up. The current extract number function I found only works for one cell at a time.

    Function ExtractNumber(Target As Range) As Variant
    Dim i As Integer
    Dim str1 As String
    For i = 1 To Len(Target)
    If IsNumeric(Mid(Target, i, 1)) Then
    str1 = str1 + Mid(Target, i, 1)
    End If
    Next i
    ExtractNumber = str1
    End Function

    Not only that, but I need to extract and add only the ones that are in <>. For example,
    Homework#3 <Numeric MaxPoints:10>, I only need the 10. However, I'd be more than gratefully if someone only helped me with my first task. Thanks to anyone in advance (Also, I'm a noob here ^^', so please pardon any rudeness I gave)

    Sincerely, flying_rock27

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Extracting numbers from multiple cells in a range

    Please read the link in my signature about cross posting.
    http://www.mrexcel.com/forum/showthread.php?t=514518

    Cross posting is not rude. Failing to provide a link to the cross post is.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Extracting numbers from multiple cells in a range

    Hi and welcome to the board

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

+ Reply to Thread

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