+ Reply to Thread
Results 1 to 2 of 2

Search needed that populates a defined array.

  1. #1
    Registered User
    Join Date
    04-21-2010
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    1

    Question Search needed that populates a defined array.

    I have the following bit of code (gathered from various resources) that almost fulfills what I need, but, is missing a crucial 'search' element.

    Please Login or Register  to view this content.
    Which works, sorta, just not completely.

    A little backstory: months ago, the data required to be returned to the listbox was just one column, so the search that I was using...

    Please Login or Register  to view this content.
    worked great until more columns were added and the corresponding data had to be returned as well. Which doesn't mean the above didn't still work, it did, I just had to concatenate the other columns to each other. But, the problem was that none of the columns lined up properly, nor could I get the column headers like I wanted. So, I switched to the first method using an array to build my listbox - giving me greater control of the column widths (where I had none) and the headers as well.

    But, I can't quite figure out how to iterate through the defined range, search for the desired text and then add that result to the array so that I can build my listbox.

    I've tried several iterations of adding the search function to the second bit of code, but, no luck; I either get NO results, or a result containing everything within defined range.

    Any help is appreciated. My google-fu is quite lacking today.

    Thanks in advance. If you need more information, glad to provide.

    J

  2. #2
    Registered User
    Join Date
    04-06-2010
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Search needed that populates a defined array.

    Welcome to the board. There's various ways of managing this - within the VBE Help look for the "Find Method" topic. Post again if your having trouble with this.

+ 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