+ Reply to Thread
Results 1 to 4 of 4

Simple macro to search for string

  1. #1
    Registered User
    Join Date
    04-05-2012
    Location
    Queensland, Australia
    MS-Off Ver
    Excel 2007
    Posts
    8

    Simple macro to search for string

    Hi guys,

    Need a macro to search for a text string in Column A that can be infinitely long. Normally over 100,000 records. String that I'm looking for is unique as it alwasy is preceeded by '<' in the cell.
    I would like the maco to search for the string, which looks comonly like '<COM123-1' or '<123'. Create a new worksheet, in the workbook and list all records, but remove the '<' first.

    So results would look like
    "
    Wkb 2
    Col A
    COM123
    COM123-1
    123
    "
    and so on.

    Any help would be greatly appreciated.

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Simple macro to search for string

    Actually, this is pretty unspecific...are you wanting a new sheet IF the value AFTER the "<" contains "123"? or a new sheet for any 3digit number AFTER the "<" ?
    A sample workbook, with some expected output would help I believe
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Simple macro to search for string

    Something like this ?
    Please Login or Register  to view this content.
    Kind regards, Harry.

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Simple macro to search for string

    Hi.

    You try this too:

    searchstring.xlsm
    Click *, if my suggestion helps you. Have a good day!!

+ 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