Excel - Data validation issue (Files provided) (Pass / Fail)


I am having a problem with an excel data validation activity. When I run the application all of the rows fail validation.

Essentially I have two excel workbooks (PDFExtract) and (Parts List) both in the same excel file. I need to see if 5 cells in each row, from PDFExtract exist in any row of workbook Parts list. For Example Row 1 has values 1,2,3,4,5 in the specified columns within PDFExtract and Parts list has the values within the specified column structure in row 32, Row 1 of PDFExtract would “Pass” validation.

Could someone please review my code to help me determine why every row is failing? Row T of PDFExtract has the values which should be returned for reference.

Thank you,
Results(DEMO).xlsx (21.4 KB)

Validation(demo).xaml (12.8 KB)


Hi Excel is not complete. Please see the conditional value.

d1(“Customer”).ToString.Trim.Equals(d2(“NAMC”).ToString.Trim) AndAlso d1(“Vendor Code”).ToString.Trim.Equals(d2(“Supplier Code”).ToString.Trim) AndAlso d1(“Unit Price”).ToString.Trim.Equals(d2(“After 21”).ToString.Trim) AndAlso d1(“Total Price”).ToString.Trim.Equals(d2(“After APR”).ToString.Trim) AndAlso(“Part Number”).ToString.Trim.Equals(d2(“Toyota Part Number”).ToString.Trim) )



The values do match, they were shortened to avoid any issues with spaces. Here is the revised file matching the excel workbook. I am not sure why the values did not save. If you could have another look I would greatly appreciate it.

Results(DEMO).xlsx (21.4 KB) Validation(demo).xaml (12.7 KB)


Can you try the following expression? Your expression lacks d1 for row(“PN”) of DT1

dt2.AsEnumerable.Any(Function(d2)   d1("C").ToString.Trim.Equals(d2("NA").ToString.Trim) AndAlso d1("VC").ToString.Trim.Equals(d2("SC").ToString.Trim) AndAlso d1("UP").ToString.Trim.Equals(d2("A21").ToString.Trim) AndAlso d1("TP").ToString.Trim.Equals(d2("AA").ToString.Trim) AndAlso d1("PN").ToString.Trim.Equals(d2("TPN").ToString.Trim) )


1 Like


Thank you for catching that typo, this looks to be the solution.

1 Like

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