Compare two excel sheets

I have an excel with two sheets I want to find if what is in Hoja 1 is in Hoja2 and if so, take that data to another sheet

this is my Hoja 2

image

and I want to look for that data in this Hoja 1 on column “K”

If there is a match I want to take the data from column “k” and “A” from Hoja 1 to another new sheet

could you help me give ideas

This is my excel
Facturas combustible.xlsx (119.6 KB)

Hi @Ivan_torres_oliva do we need to take duplicates values too of FACTURA in HOJA1?

hello, so it is even that they are repeated, since in some occasions column A is different

@Ivan_torres_oliva

What you are trying to say is that you want to compare the particular columns with each other supposedly HOJA 1(Excel 1 any column) data to particular column FACTURA in HOJA 2 (Excel 2)??

What if the same value is repeating again and again? Need to take those too?

Am I getting it right?

Hello, sorry for the delay, but that’s how you say it, even if they repeat, I need that data

for example like this, try the following but it doesn’t work for me

this is my first and main table
image

and this is the second one where I have to look for the data according to the “FACTURA” column, and paste only invoice and folio on the new sheet

and this is my code, I also attach the excel and my .xaml

Main.xaml (8.8 KB)
Facturas combustible.xlsx (113.6 KB)

Hi @Ivan_torres_oliva

I think same scenario u had given here

If yes solution for this is also provided