How to find matching values in two excel sheet

Hi Team,

I have one excel with two sheet i want find matching values for both sheet based upon the result should pass the one datatable linq query

Input is Name, if i gave name is “XXX” in column to get opposite value Status column of “Active” or InActive"
same like to do in sheet 2 also, based upon the status should pass the datatable linq query

If both result is Active to pass datatable linq query
if Sheet 1 Active and Sheet 2 InActive Should change to sheet 2 InActive to Active then pass Datatable linq query
if Sheet 1 InActive Sheet 2 Active to pass dtatatble linq query
if Sheet 1 InActive and Sheet 2 InActive to Update logmessage(“SKIP”)

Please help me anyone for this.

Input Sheet 1:
image

Input Sheet 2:
image

Regards,
Raja G

Hi @Raja.G ,

Could you maybe explain in terms of manual steps how would you perform this task ?

Could you also provide an Expected Output for the Input Data provided if there is an Update happening to the sheets.

Hi @supermanPunch ,

I mention that query is

(From row In dt_data.AsEnumerable
Let a = String.Join(“,”,System.Text.RegularExpressions.Regex.Matches(String.Join(“,”,row.ItemArray),“\b\d{2}.\d{2}.\d{2}\b”)).Split(CChar(“,”)).ToList
Let b = String.Join(“,”,a.Where(Function(x) x.ToString.Equals(Now.ToString(“MM.dd.yy”)))).ToList().Count=4
Let c = (String.Join(“,”,((String.Join(“,”,row.ItemArray)).Split(“,”.ToCharArray,StringSplitOptions.RemoveEmptyEntries)).toarray())+“,Output”+Now.ToString(“MM.dd.yy”)).Split(CChar(“,”))
Let d = If(row(“Name”).ToString.Equals(str_Name),c,row.ItemArray)
Select dt_data.Clone.Rows.Add(d)).CopyToDataTable

This query is based upon input name is active than check the input date is found maximam 4 or not if 4 count is found then skip else update today date.

If possible to get with same format and update result also in same sheet.

Expected result:

Hi Team,

I want only status of both sheet combination result, i will pass query based upon combination result.

Combination below,
If both result is Active to pass datatable linq query
if Sheet 1 Active and Sheet 2 InActive Should change to sheet 2 InActive to Active then pass Datatable linq query
if Sheet 1 InActive Sheet 2 Active to pass dtatatble linq query
if Sheet 1 InActive and Sheet 2 InActive to Update logmessage(“SKIP”)

Regards,
Raja G

Hi Team,

Please anyone help me for this.

Regards,
Raja G

hi @Raja.G
Please find below topic this may help you to reslove you question ,

Regards
Mohini
Happy Automtaion …

1 Like