+ Reply to Thread
Results 1 to 5 of 5

Parsing A Number from An Inconsistent Note

  1. #1
    Registered User
    Join Date
    11-12-2012
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    1

    Parsing A Number from An Inconsistent Note

    Hello,

    I've ran into a problem with a table containing thousands of notes for each of these accounts. Each note may or may not contain a 4-6 digit account number, and a 2-digit number for something else relevant. The rest of the data in the notes is irrelevant, but the format of the notes is completely inconsistent, and the numbers are not in any particular place.

    Another complication is that the data imported containing line breaks into the cells, which I am not sure if I can remove ahead of time or at least work around. As a note, there are no line breaks in the numbers - they are all together. The 2-digit numbers are one of a specific list of numbers that I do have, so I can compare those and find those. The account numbers, however, are very difficult to find!

    I've been working on a VBA macro to fix this, but I'm running out of time and I need to have it completed shortly so I am reaching out for any help I can get!

    I apologize, but examples are not something I can provide as the information being sorted is confidential. I think I've provided an adequate explanation, but if something else is needed please let me know ASAP.


    < There is a line break pasted directly before the arrow - in case that's needed.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Parsing A Number from An Inconsistent Note

    It would be good to upload a wb with the some of the notes, so we can get a better idea on how to solve this for you.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

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

    Re: Parsing A Number from An Inconsistent Note

    Can you show us few dummy examples.

    You can replace all alphabets with "x".

    e.g

    xxxxx xxxx 12345 12
    123456 xxx 33 xxx xxxx

    etc.

  4. #4
    Forum Contributor
    Join Date
    06-27-2006
    Posts
    310

    Re: Parsing A Number from An Inconsistent Note

    The account numbers, however, are very difficult to find!
    Not really

    Try this function it will return 'false' if there is no account number 4 to 6 digits long.
    It should work regardless of line breaks so long as those breaks don't occur within the account number or 2 digit number.
    Please Login or Register  to view this content.
    Usage
    Please Login or Register  to view this content.
    If those line breaks can occur in the middle of the numbers let me know and we can try to rework the function to account for that.
    Last edited by SuitedAces; 11-12-2012 at 11:10 PM.

  5. #5
    Forum Contributor
    Join Date
    06-27-2006
    Posts
    310

    Re: Parsing A Number from An Inconsistent Note

    I expanded it to eliminate any line breaks
    Please Login or Register  to view this content.
    Last edited by SuitedAces; 11-13-2012 at 12:51 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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