Searching and displaying data via VBA code

kets23

New Member
Joined
Feb 29, 2016
Messages
19
Hi

Would like a code that helps me identify a search criteria and takes me to the entered name or tells me that the entered name does not exist.

I have a command box on sheet 1 which will have the stored code, when this button is pressed, it brings up a user entry input box for the name to be entered, the name entered is then searched for within sheet 2. Sheet 2 holds the data and the named field is stored in column F. If the entered name exists, it takes me to that row, if it does not exist, than a message advising name not listed is displayed with ok button.

Column F has the full name so I would like the option to only enter part of a name i.e. surname within the user entry input box.

Alternatively, is there is a non vba of doing this by using excel's formula etc.

Many thanks

Kets
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
It would search for the surname entered i.e. if Roberts is typed in, it would search for Roberts only, hope this helps.
 
Upvote 0
Hi Steve

Column F has the full name i.e Joe Bloggs, search to be Bloggs or bloggs (but ignores case). If it makes it easier, can enter full name which I think would be better as it will then find the right person i.e. if there was a Joe Bloggs and a Tony Bloggs, probably best to use the full name so it finds the correct match.

Hope this makes sense.
 
Upvote 0

Forum statistics

Threads
1,215,521
Messages
6,125,303
Members
449,218
Latest member
Excel Master

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