Take two for each rows loop and use if condition inside the for each rows loop.
Use the below condition dtTable1.rows(Puchase_Odrer)=dt.Table2.Rows(Puchase_order ) AND dtTable1.rows(Line#)=dtTable2.(Line#) AND dtTable1.Rows(Submitted Amt)=dt.Table2.Rows(Submitted Amt)
Use the below formula in if condition.
row(“Purchase_Order”).ToString=dt2Row(“Purchase_Order”).ToString AND row(“Line#”).ToString=dt2Row(“Line#”).ToString AND
row(“Submitted Amt”).ToString=dt2Row(“Submitted Amt”).ToString
If you are facing issue for amount column while comparing , convert that row value to integer and compare that row value.
I had some problems with using column indexes.
I modified the input like this:
Coupa.Rows (0) .Item (0) .ToString = TSnow3.Rows (0) .Item (0) .ToString And
Coupa.Rows (0) .Item (1) .ToString = TSnow3.Rows (0) .Item (1) .ToString And
Coupa.Rows (0) .Item (3) .ToString = TSnow3.Rows (0) .Item (3) .ToString
It Works…
By adding the account check, I have an error.
It probably contains some errors. Or better,
almost certainly some operation could have been done differently.
I don’t have much experience, and I’m going through small steps.
It works … “almost”.
Small details are missing for the happy path … let’s say so.
Hi All,
I have a question here i.e., rather passing the column headers, can we dynamically loop through the two sheets row column values. The requirement here is - the excelOne sheet contains x columns (dynamic) and the excelTwo also contains x columns but column order might be different but headers are the same, and there is an unique values in one column and those values are same in two sheets. I need to compare two sheets rows one by one with the Unique key reference and if any deviations in values of the row columns, i have to display to the user, and the user will make the action like whether he would be conite with either sheetOne or sheeTwo values. Awaiting for solutions from expertise. Thanks all.