+ Reply to Thread
Results 1 to 4 of 4

extract numberic database from long string value depends upon index value

  1. #1
    Forum Contributor
    Join Date
    04-30-2013
    Location
    washington
    MS-Off Ver
    Excel 2019
    Posts
    168

    extract numberic database from long string value depends upon index value

    Dear experts

    I have alphanumberic long string in cell and want to pull the numeric value from cell depend upon header Dead or killed and injured or wounded
    whereas come along with text string in cell.

    The 2001 HaSharon Mall suicide bombing in Netanya, Israel. 5 killed 100+ injured. pull like (5 killed) and (100+ Injured)
    2002 Jaffa Street bombing. 1 dead,23 Wounded Pull like (1 dead) and (23 wounded)

    find the attachmen
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: extract numberic database from long string value depends upon index value

    Hi johnlara,

    Sad topic, but interesting techincal problem. See the attached file with complete code below. I approached the problem as follows:
    a. A Data line was read and conveted to Upper Case.
    b. Commas embedded in numbers were removed.
    c. A space was added when a number was adjacent to a non-number.
    d. All commas and periods were removed.
    e. Certain IRRELEVANT KEYWORDS (e.g. People, Men, Women) were removed.
    f. The remaining text in the line was parsed into tokens (i.e. words).
    g. A match was found when one of your IMPORTANT KEYWORDS was preceded by a number. The Number was placed in the appropriate Column. More than one match is allowed for a category in a row.

    As you get more experience, additional IRRELEVANT KEYWORDSmay have to be added.

    In an ordinary Code Module such as Module1 or ModProcessTextStrings:
    Please Login or Register  to view this content.
    If you need help with Macros and or VBA:

    To enable Macros and to Run Macros see the following:
    http://office.microsoft.com/en-us/ex...010031071.aspx
    http://office.microsoft.com/en-us/ex...010014113.aspx
    If help is still needed do a google search for 'youtube excel enable macro' and/or 'youtube excel run macro'.

    To access Visual Basic (VBA) see:
    http://www.ablebits.com/office-addin...a-macro-excel/
    a. Click on any cell in the Excel Spreadsheet (may not be needed).
    b. ALT-F11 to get to VBA.
    c. CTRL-R to get project explorer (if it isn't already showing).
    d. Double Click on a 'Module Name' in 'Project Explorer' to see code for that module.

    Lewis

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

    Re: extract numberic database from long string value depends upon index value

    Try
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    04-30-2013
    Location
    washington
    MS-Off Ver
    Excel 2019
    Posts
    168

    Re: extract numberic database from long string value depends upon index value

    Thanks sir its works perfecly

+ 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. Extract values from long string
    By s@skia in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-13-2014, 12:32 PM
  2. what formula to extract text from a long string?
    By SEMMatt in forum Excel General
    Replies: 5
    Last Post: 10-07-2012, 10:23 PM
  3. Extract only numberic values from a cell
    By tferrence in forum Excel General
    Replies: 3
    Last Post: 08-11-2008, 12:35 PM
  4. [SOLVED] Extract specific value from a long text string
    By Dinesh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-10-2006, 11:30 PM
  5. [SOLVED] Extract sub-string of number from field of long series of numbers
    By ExcelExtrator in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-27-2005, 07:00 PM
  6. Excel Database Query String Too Long
    By Karl Burrows in forum Excel General
    Replies: 4
    Last Post: 01-27-2005, 03:06 AM
  7. [SOLVED] Excel Database Query String Too Long
    By Karl Burrows in forum Excel General
    Replies: 4
    Last Post: 01-27-2005, 03:06 AM
  8. Excel Database Query String Too Long
    By Karl Burrows in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-27-2005, 03:06 AM

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