Seach text

There two text field, numtext and nametext. There are 10 textfield each. Example as follow:

numtext nametext
1 Peter
2 John
3 Mary
4 Steve
5 May
6 John
7 Philip
8 Nancy
9 Susy
10 Maggi

How do I create a button and text field to seach for a name belongs to which number. For example, if I want to know John, I just type John in text field and press a button, another text field shows John has number 2 and 6.
Searching helping hands.