Macro for Partial String in Text

kclong

Board Regular
Joined
Nov 22, 2006
Messages
80
I want to write an macro where it searches for text in a column, but the text may be a partial string. The text is in column B, with account numbers in column A, like this:

Column A Column B
1100 Jay
1101 Jack
1102 Jackson
1103 Jacksony
1104 Jefferson

For example, I want to search on Jack in column B. In the above example, I want it to find accounts 1101, 1102, and 1103, and to copy that information to another spreadsheet, say, sheet2. If possible, I'd like it to copy the first account number and name, 1101 Jack, and if that's not what the user wants, they click next and they see 102 Jackson and so forth. Any help you can give me is greatly apprecited.
 


Would anyone be able to help me, (I am pretty desperate) with a search macro (excel 2007/2010) that works very similar to Ctr F / Edit Find, except that I would like to be able to search for a partial text string / value (numbers) for example.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
I have various models of cars with different model numbers eg.<o:p></o:p>
<o:p></o:p>
BMW 320<o:p></o:p>
BMW 320i<o:p></o:p>
BMW 750<o:p></o:p>
<o:p></o:p>
When the macro is run I would like a search box to appear and allow the user to input different variations, key words eg in the search box I would enter "320 bm" and the result should return all the above entries because each of the entries contain “bm” and two contain “bm and 320”. This would work the same as ctrl find until it can find no more entries.<o:p></o:p>
<o:p></o:p>
The data could be across various worksheets is one workbook and the search must not be case sensitive

Thanking you in advance

Kevin
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Try creating your own thread. Not many helpers will look at an old thread with lots of replies.
 
Upvote 0
I am extremely inexperienced with using Macro's and would be most grateful if you could assist me with the correct thread so that I can hopefully try and understand and learn how the process work<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
 
Upvote 0

Forum statistics

Threads
1,217,367
Messages
6,136,146
Members
449,994
Latest member
Rocky Mountain High

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