+ Reply to Thread
Results 1 to 10 of 10

Extract numeric value from string, and multiply by parts Qty

  1. #1
    Registered User
    Join Date
    11-18-2015
    Location
    VA
    MS-Off Ver
    2016
    Posts
    19

    Extract numeric value from string, and multiply by parts Qty

    So, I've come across an issue with a template I've been working on for engineers.
    The template simply consolidates all their parts across many sheets into one sheet.
    So far the parts count is working wonderfully (mostly thanks to the people on this forum).
    The macro set works primarily because they have specific standards of operation, however, all engineers do one thing differently.

    They will note if a parts list is typical (for more than one unit) and note it differently (see example excel).

    I'm not sure if there's a way to dynamically search for something that contains "typ" in column A, but I think that is the right direction.
    The last listed example shows how they will list two specific units, but only list the parts for one unit, I can get them to change that standard if it can't be coded to adapt to that.

    Primarily they will type "Typical for #", and I had a macro for that, but there are too many different engineers with different methods of annotating it.

    Example 2.xlsx

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Extract numeric value from string, and multiply by parts Qty

    You can use Like in conjunction with wildcards to search for it.

    Please Login or Register  to view this content.
    Additionally: for the final portion "Quantity Typical for Unit-6 and PG-8", where are you pulling a value of 2 to multiply times each of the quantities?
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

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

    Re: Extract numeric value from string, and multiply by parts Qty

    See if this is what you wanted.
    Not sure about your result for last 2 items.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-18-2015
    Location
    VA
    MS-Off Ver
    2016
    Posts
    19

    Re: Extract numeric value from string, and multiply by parts Qty

    I believe the code above is working best, will update later on results.
    Last edited by Anxiety; 11-30-2015 at 04:01 PM. Reason: Possibly Solved

  5. #5
    Registered User
    Join Date
    11-18-2015
    Location
    VA
    MS-Off Ver
    2016
    Posts
    19

    Re: Extract numeric value from string, and multiply by parts Qty

    jindon may have solved the initial problem. I merely had to add an error handler to skip lines that were causing debug handling.
    Last edited by Anxiety; 11-30-2015 at 04:03 PM. Reason: See above

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

    Re: Extract numeric value from string, and multiply by parts Qty

    If you upload a workbook clearly showing possible combination of the data and exact desired results, it may help to understand what you are trying to do.

  7. #7
    Registered User
    Join Date
    11-18-2015
    Location
    VA
    MS-Off Ver
    2016
    Posts
    19

    Re: Extract numeric value from string, and multiply by parts Qty

    It works well, but unfortunately it will multiply any number in column A above the table.

    Is there a way to skip the math by asking only if it says "Typ" or "Typical" in the string?


    In my example worksheet, on the After sheet, the last table should not change, but with your code, it does.

    Thanks.

    Example 2.xlsx

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

    Re: Extract numeric value from string, and multiply by parts Qty

    Change to
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    11-18-2015
    Location
    VA
    MS-Off Ver
    2016
    Posts
    19

    Re: Extract numeric value from string, and multiply by parts Qty

    Works perfectly, thanks very much.

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

    Re: Extract numeric value from string, and multiply by parts Qty

    You are welcome.

+ 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. Formula to extract parts of text string
    By edorris3 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-11-2014, 10:22 AM
  2. Extract Numeric from a String
    By wlteo1983 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2014, 06:05 AM
  3. [SOLVED] Extract a mainly numeric string (ISSN number) from an arbitrary string
    By Buzzed Aldrin in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-04-2012, 01:49 PM
  4. Extract numeric value from a string of unknowns
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-01-2010, 12:00 PM
  5. Extract numeric and char from string!
    By aywen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2007, 11:39 AM
  6. [SOLVED] Extract certain parts of string
    By djDaemon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-02-2006, 03:45 PM
  7. [SOLVED] RE: Extract certain parts of string
    By djDaemon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-02-2006, 11:35 AM

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