View Single Post
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

assuming that your 3 digit area code is in row 1 between A1:D1 and the phone
number is between B1:D6000
and "another cell" holding the area code is cell F1 and phone number in F2

=IF(ISNA(INDEX(OFFSET(A2,,MATCH(F1,$A$1:$D$1,0)-1,6000),MATCH(F2,OFFSET(A2,,MATCH(F1,$A$1:$D$1,0)-1,6000),0))),"N","Y")

will give a Y or N depending whether phne number exists

If your "another cell" holds both area code and tel # in 1 single cell say
in cell F1 then use

=IF(ISNA(INDEX(OFFSET(A2,,MATCH(left(F1,3),$A$1:$D $1,0)-1,6000),MATCH(F2,OFFSET(A2,,MATCH(right(F1,7),$A$1 :$D$1,0)-1,6000),0))),"N","Y")


"Rod" wrote in message
...
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!