Search function

Bippym

New Member
Joined
Oct 3, 2011
Messages
3
Hi,

I have been trying to create a search routine, with little success. What I have are 22 different columns, I will only be searching one column at a time, and I would like to pass the number of the column to search to the sub as an argument along with the search string. ** Sub find(searchtxt, column)

I would then like to display certain columns from the row the results are in to a listbox from the userform it was executed from, and then allow the user to select the required result and that will then populate another userform (Using all information from the entire row).

I don't want someone to write this directly for me, I would like pointing in the right direction to achieve this myself.

Thanks
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi there,

Given that you want to achieve this with only hints (which I applaud), could you show us what you have so far (code-wise)?

Off the top, I would suggest starting with putting the .Find in its own function. This way, you can pass the range (the column) being searched as an argument that should be able to pass back the cell found and have the function as a bool. That is just one way of course...
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,790
Members
452,942
Latest member
VijayNewtoExcel

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