Filter column based on another excel

Hi,

Is there any way where i can filter row in column g,sheet 1 with another sheet?

For an example:

This is my original data:

image

And i want to filter it with this column in different sheet(sheet 2)

image

@mashy2

Yes, you can achieve it through “For each row
Read the sheet 1 and sheet 2 and iterate the Sheet 2 Datatable using For Each row,
in body use Filter Datatable.

Hope this will help you.

Thanks,
Suresh J

@mashy2

Method1:
Read Sheet1 make as one datatable

Read sheet2 make as one datable and use below code

(From x In dtPeriod.AsEnumerable() where (From a In dtPeriod.AsEnumerable() Join b In dt_calandar_datatable1.AsEnumerable() On a(“column3”).ToString Equals b(“columnName”).ToString select a).Contains(x) select x).CopyToDataTable()

Method:2

Use Vlookup in excel itself

2 Likes

thanks so much!!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.