View Single Post
  #3   Report Post  
Rod
 
Posts: n/a
Default

Not quit sure what to change. The area codes are as follows:
A1 B1 C1...
Area1 Area2 Area3...

The phone numbers are as follows:
A2 B2 C2...
Phone1 Phone2 Phone3...
PhoneX PhoneY PhoneZ

Area codes and numbers will always be separated as above.

If I enter Area2 and then PhoneY I should get a "Y" as a result. If I enter
Area1 and PhoneZ I should get a "N"

Thanks

"N Harkawat" wrote:

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!