Returning results of search to a list box

itsme2

Board Regular
Joined
Jul 29, 2006
Messages
66
Anyone have an idea how I may convert this piece of code so that the results found (entire row) of a search may be presented in a "list box" instead of just pasting to another row?

Code:
Found.EntireRow.Copy _
    Destination:=Worksheets("Results").Range("A2").End(xlUp).Offset(1, 0)
    Sheets("Results").Select

I've attempted a few ideas with not quite the results I had expected for starters, only the first cell is returned...
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
itsme2

1) How many and which columns do you want to display in the listbox?
2) Which column Found reside in?
 
Upvote 0
5 coluimns and the target will be A2:E2 which I suspect will need to be merged at least that is what I have attempted to do by simply running a bit of "cleanup code" after the selection to make certain the information retrieved is formatted for easy viewing. So what I am looking for I suppose is replacing A2:E2 with some sort of list box that will allow me to select from multiple return of values of say up to three results of the search.

It would be very messy to simply leave three rows open on this sheet to copy the possible 3 rows found during the search and is why I was looking to incorporate some form of list style box so that I may by, clicking on one of the cells, view the second, or third, or back to the first results found...

Does that make sense?
 
Upvote 0
OK
Do you want to list the result in the userform or sheet and do you care to show us your subroutine?
 
Upvote 0
Yes, in the sheet and the cleanup code does absolutely nothing but merge cells and changes the actual font size, color and so on. It does also remove two cells that realy do not contain pertinent information as a result of the search so it simply displays whether the results of the search are valid or not....

Is that what you are asking, the "cleanup" code?
 
Upvote 0
Code:
Found.EntireRow.Copy _
    Destination:=Worksheets("Results").Range("A2").End(xlUp).Offset(1, 0)
    Sheets("Results").Select
I thought you would have a code already for above...

Find:
1) what?
2) in which sheet?
3) in which column?
 
Upvote 0
I don't think that is relative actually the question is how do I change the destination format

Destination:=Worksheets("Results"). (and from here utilize some form of list box instead of simply locating the empty row and pasting the results)

I think we are not on the same page on this for some reason
 
Upvote 0
Anyone have an idea how I may convert this piece of code so that the results found (entire row) of a search may be presented in a "list box" instead of just pasting to another row?
Do you want to display the results found in the "ListBox" or what?
 
Upvote 0

Forum statistics

Threads
1,217,451
Messages
6,136,714
Members
450,025
Latest member
Beginner52

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top