Comparing/Matching two columns

S

shress

Hi,

I am stuck with a problem. I need to compare two columns. one with ZIP and
other with street names. A Single ZIP has numerous streent names. Is there a
function which will say if the address is Right or Wrong?
for example:
11000 Apple Street <Right>
11000 Banana Street <Right>
11000 Mango Street <Wrong>

and so on

Thanks,
 
S

smartin

shress said:
Hi,

I am stuck with a problem. I need to compare two columns. one with ZIP and
other with street names. A Single ZIP has numerous streent names. Is there a
function which will say if the address is Right or Wrong?
for example:
11000 Apple Street <Right>
11000 Banana Street <Right>
11000 Mango Street <Wrong>

and so on

Thanks,

Do you have a table somewhere with valid zip/street combinations?
 
L

Lars-Åke Aspelin

Hi,

I am stuck with a problem. I need to compare two columns. one with ZIP and
other with street names. A Single ZIP has numerous streent names. Is there a
function which will say if the address is Right or Wrong?
for example:
11000 Apple Street <Right>
11000 Banana Street <Right>
11000 Mango Street <Wrong>

and so on

Thanks,

Try this formula in cell C1:

=IF(SUMPRODUCT((Sheet2!A$1:A$1000=A1)*(Sheet2!B$1:B$1000=B1))=0,"<Wrong>","<Right>")

Sheet2 is the name of the sheet where you put all possible ZIP codes
in column A and the correspoonding Street names in column B.
Increase the 1000 if you data takes more than 1000 rows.

Hope this helps / Lars-Åke
 
S

shress

smartin said:
Do you have a table somewhere with valid zip/street combinations?
Hi, I have one table with valid zip/street combinations.
And I have got another bigger table which contails both valid and invalid
zip/street combinations and also lots of repetitions. I am trying to find out
those invalid addresses based on the correct table.

Thanks
 
S

shress

Thanks Lars,

It worked well. :)

Regards,

Lars-Ã…ke Aspelin said:
Try this formula in cell C1:

=IF(SUMPRODUCT((Sheet2!A$1:A$1000=A1)*(Sheet2!B$1:B$1000=B1))=0,"<Wrong>","<Right>")

Sheet2 is the name of the sheet where you put all possible ZIP codes
in column A and the correspoonding Street names in column B.
Increase the 1000 if you data takes more than 1000 rows.

Hope this helps / Lars-Ã…ke
 
S

smartin

shress said:
Hi, I have one table with valid zip/street combinations.
And I have got another bigger table which contails both valid and invalid
zip/street combinations and also lots of repetitions. I am trying to find out
those invalid addresses based on the correct table.

Thanks

Then I think Lars has a solution. O, I see you got it. Well done!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top