Excel - Match Rows in Another file

Asked

Viewed 36 times

2

The question is: The Question is:

I have 2 csv files, one of them has only one "email" column with several lines of valid emails, I also have another file that has the same emails and some more, in this file there are other columns like, Country, City, Name etc..

My goal is to filter the second file all lines in which email is present the valid email file + invalid + info (country, city, etx..) Like this:

File of valid emails:

email            |
------------------
[email protected]
------------------

Valid + invalid + email file:

email | name | city | country
------------------------------
[email protected] | Miguel | Porto | PT
------------------------------------------
[email protected] | Invalid | Lisbon | PT

The result should be all valid emails + info:

email | name | city | country
------------------------------
[email protected] | Miguel | Porto | PT
------------------------------------------

Files contain thousands of lines, not feasible to delete line by line. How can I do this? Thank you!

  • Hi, this is Stackoverflow in Portuguese, then we would appreciate it if you could translate your question into English (or, alternatively, post it on Soen). Thank you!

1 answer

0

Hello, you have to do this through VBA or want to do for work and can be by formulas?

if it can be done by formulas the solution is rather simple. Just do an index-match or a simple Vlookup(procv) with an if for the second file.

This way, the solution could be to put this formula below in the second file, in a column after "country" as the name you want (Valid emails/ pro example):

=if(vlookup("célula onde está o e-mail";"no ficheiro 1 Coluna inteira onde está o e-mail";1;0)="célula onde está o e-mail";"Válido"-entre aspas mesmo;"Não Válido"-também entre aspas)

If you’re still in trouble, just let me know.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.