Test.zip (11.8 KB)
Good afternoon,
I’ve provided the two excel files (foo data) to help explain my current question.
Scenario:
I have two different worksheets that share a common denominator column called the “PHY ID”
I am using this column to compare and find like values from both worksheets and take the matching rows and push them out to an additional sheet of ‘results’.
Excel files:
Compliance Provider Roster - Smaller data (has less rows)
Annual Training Report - Larger data (has more rows)
I have approached the solution as follows:
- Read in both sheets, output each to a corresponding data table, sort data tables on column “PHYID” on both excel files by ascending
- Create a Results data table and clear this data table.
- To Compare: Create a For Each Row with the outer - Annual Training Report data table being the larger of the two and wrapping another for each row inside of that: inner - Compliance Provider Roster
- Compare the PHY ID’s as shown in the screen show.
Question:
Because there are not equal amount of rows on the reports, is there a way I could write the else statement if it does find a match (nested if) to not re-check values in that column again because further comparisons aren’t going to yield anything if the number (PHY ID) is bigger than the number I am searching for. I’m not sure how to write this.
Thanks