+ Reply to Thread
Results 1 to 3 of 3

How to tidy string data that doesn't meet a variable pattern

  1. #1
    Registered User
    Join Date
    07-03-2021
    Location
    Scarborough, England
    MS-Off Ver
    365
    Posts
    4

    How to tidy string data that doesn't meet a variable pattern

    I'm looking to solve a problem I encounter on a daily basis at work. I have to convert a bill=of-materials into usable data. These can sometimes extend to hundreds of lines of data per BOM, so it's a tiresome task and open to mistakes. Under the instructions header (see attached sample) are varied strings, of which (due to the good people on this forum) have been sorted out, stripping out the alpha character, cleaning the numerical data, and then adding the alpha character back in behind each numerical character again.

    What I'm trying to achieve is highlighting any sub-strings that interfere with the above process, so that I can spot them easily and remove them manually. The problem lies in that each row will contain various differing prefix characters, and the string sections that do not fit the typical pattern may consist of instruction mistakes (an additional character) or a line of text after the initial string patterns duplicates between different lines, or even in the same string occasionally happens too. Any help or guidance would be hugely appreciated
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to tidy string data that doesn't meet a variable pattern

    I haven't seen your other posts about this. What are the rules you need to follow to highlight the substrings that cause the problems? In your example CX10 and DE20 do not follow the pattern, but I don't know what the pattern is. X3 is duplicated in the string below, but I don't know what rule that violates: Must not be duplicated in the string below? Must not be duplicated on any row?

    If you can be more specific this shouldn't be too hard. However, highlighting only portions of a cell instead of the whole cell will require VBA.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

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

    Re: How to tidy string data that doesn't meet a variable pattern

    For the data provided.
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. [SOLVED] Rotation Pattern based on the Pattern String for scheduling tasks
    By qadeerume in forum Excel General
    Replies: 8
    Last Post: 08-11-2020, 11:49 PM
  2. [SOLVED] Split string variable by specific pattern
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 04-17-2018, 03:07 AM
  3. Delete rows in data where column B doesn't meet criteria
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-01-2017, 11:58 AM
  4. Combining data into one String Pattern
    By usama5788 in forum Excel General
    Replies: 17
    Last Post: 06-01-2017, 04:31 PM
  5. Replies: 0
    Last Post: 03-18-2015, 11:30 AM
  6. Replies: 2
    Last Post: 02-12-2014, 11:14 PM
  7. Replies: 7
    Last Post: 10-23-2012, 08:38 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