=ISNUMBER(MATCH(F2,INDEX($A$2:$D$6000,0,MATCH(F1,$A$1:$D$1,0)),0))+0

where A1:D1 houses area codes, A2:D600 phone numbers, F1 an area code of
interest, and F2 a phone number of interest.

Custom format the formula cell as:

[=0]"N";[=1]"Y"

Rod wrote:
> How can I quickly search a LARGE amount of numbers in the format:
>
> a1 a2 a3 a4 a5 a6...
> n1 n6 n11
> n2 n7 ...
> n3 n8
> n4 n9
> n5 n10
>
> where a# are three digit area codes and n# are 7 digit phone numbers. The
> area code col to be search will be determined and feed from another cell.
> Once this formula sees there is an area code it should check the area code
> headings for a match then serach that area code col to find a phone number
> match if one exist. A simple "Y" or "N" return value would suffice as a
> result of the fomula.
>
> Thank You!