String Search & Listing Based on a Substring

manojrke

New Member
Joined
Jul 1, 2015
Messages
1
Hi Gurus !

I have a big database of Employees that has a unique key "ID No." now What I want is that if I enter 'Jon' in a cell then the I should be able to find all employees who have substring Jon in their names, and their names & ID no. should appear as a list.

The expected result is something like this:


Enter Full/Part Name - Jon

ID No. Name
12345 Jonathan
12347 Jonarch
13596 Jonark
19856 Jonam
95689 Jonace

How can it be done ?

Thanks in anticipation.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
E1: Jon

A:B houses Employees from row 2 on, with headers in row 1.

E2, just enter:
Rich (BB code):

=COUNTIFS(INDEX(Employees,0,2),"*"&E1&"*")

E4, control+shift+enter, not just enter, and copy down:
Rich (BB code):

=IF(ROWS($E$4:E4)<=$E$2,
    SMALL(IF(ISNUMBER(SEARCH("|"&$E$1,"|"&INDEX(Employees,0,2))),
    ROW(Employees)-ROW(INDEX(Employees,1,1))+1),ROWS($E$4:E4)),"")

F4, just enter, copy across, and down:
Rich (BB code):

=IF($E4="","",INDEX(Employees,$E4,COLUMNS($F4:F$4)))
 
Upvote 0

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

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