Hello All,
I have spent a few days looking around the internet for an answer to my question, but no luck. I am trying to compare sheet 'Base_Mach' to 'Comp_Mach' and create a new sheet with the results. I have found threads on how to do this, but there is another twist to what I am trying to accomplish. Here's a quick example of two databases and how I need to compare them:
Base_Mach:[TABLE="width: 500"]
<TBODY>[TR]
[TD]MachineId
[/TD]
[TD]LoopId
[/TD]
[TD]Phases
[/TD]
[TD]AutoMode
[/TD]
[/TR]
[TR]
[TD]8433
[/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[TD]True
[/TD]
[/TR]
[TR]
[TD]8433
[/TD]
[TD]3
[/TD]
[TD]3
[/TD]
[TD]True
[/TD]
[/TR]
[TR]
[TD]8433
[/TD]
[TD]4
[/TD]
[TD]3
[/TD]
[TD]False
[/TD]
[/TR]
</TBODY>[/TABLE]
Comp_Mach:[TABLE="width: 500"]
<TBODY>[TR]
[TD]MachineId
[/TD]
[TD]LoopId
[/TD]
[TD]Phases
[/TD]
[TD]AutoMode
[/TD]
[/TR]
[TR]
[TD]3584
[/TD]
[TD]1
[/TD]
[TD]3
[/TD]
[TD]False
[/TD]
[/TR]
[TR]
[TD]3584
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]False
[/TD]
[/TR]
[TR]
[TD]3584
[/TD]
[TD]3
[/TD]
[TD]3
[/TD]
[TD]True
[/TD]
[/TR]
[TR]
[TD]3584
[/TD]
[TD]4
[/TD]
[TD]2
[/TD]
[TD]False
[/TD]
[/TR]
</TBODY>[/TABLE]
The problem I am having is that I want to compare these two tables (both are sorted by LoopId), and need to compare LoopId 1 to LoopId 1, LoopId 2 to LoopId 2, etc. If there is no '2' like in the above example, I'm hoping to skip that row and make a note that it does not exist in that row. Then continue the comparison by doing 3 vs 3 and 4 vs 4...
The result would be something along the lines of:
Results:
[TABLE="width: 500"]
<TBODY>[TR]
[TD]LoopId
[/TD]
[TD]Phases
[/TD]
[TD]AutoMode
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]diff
[/TD]
[TD]diff
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]N/A
[/TD]
[TD]N/A
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]same
[/TD]
[TD]same
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]diff
[/TD]
[TD]same
[/TD]
[/TR]
</TBODY>[/TABLE]
I am able to compare all of the cells in one sheet versus the other sheet but if there is a machine that does not have 1 or more loops, the whole comparison is thrown off.
I would really appreciate any help!!
I have spent a few days looking around the internet for an answer to my question, but no luck. I am trying to compare sheet 'Base_Mach' to 'Comp_Mach' and create a new sheet with the results. I have found threads on how to do this, but there is another twist to what I am trying to accomplish. Here's a quick example of two databases and how I need to compare them:
Base_Mach:[TABLE="width: 500"]
<TBODY>[TR]
[TD]MachineId
[/TD]
[TD]LoopId
[/TD]
[TD]Phases
[/TD]
[TD]AutoMode
[/TD]
[/TR]
[TR]
[TD]8433
[/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[TD]True
[/TD]
[/TR]
[TR]
[TD]8433
[/TD]
[TD]3
[/TD]
[TD]3
[/TD]
[TD]True
[/TD]
[/TR]
[TR]
[TD]8433
[/TD]
[TD]4
[/TD]
[TD]3
[/TD]
[TD]False
[/TD]
[/TR]
</TBODY>[/TABLE]
Comp_Mach:[TABLE="width: 500"]
<TBODY>[TR]
[TD]MachineId
[/TD]
[TD]LoopId
[/TD]
[TD]Phases
[/TD]
[TD]AutoMode
[/TD]
[/TR]
[TR]
[TD]3584
[/TD]
[TD]1
[/TD]
[TD]3
[/TD]
[TD]False
[/TD]
[/TR]
[TR]
[TD]3584
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]False
[/TD]
[/TR]
[TR]
[TD]3584
[/TD]
[TD]3
[/TD]
[TD]3
[/TD]
[TD]True
[/TD]
[/TR]
[TR]
[TD]3584
[/TD]
[TD]4
[/TD]
[TD]2
[/TD]
[TD]False
[/TD]
[/TR]
</TBODY>[/TABLE]
The problem I am having is that I want to compare these two tables (both are sorted by LoopId), and need to compare LoopId 1 to LoopId 1, LoopId 2 to LoopId 2, etc. If there is no '2' like in the above example, I'm hoping to skip that row and make a note that it does not exist in that row. Then continue the comparison by doing 3 vs 3 and 4 vs 4...
The result would be something along the lines of:
Results:
[TABLE="width: 500"]
<TBODY>[TR]
[TD]LoopId
[/TD]
[TD]Phases
[/TD]
[TD]AutoMode
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]diff
[/TD]
[TD]diff
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]N/A
[/TD]
[TD]N/A
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]same
[/TD]
[TD]same
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]diff
[/TD]
[TD]same
[/TD]
[/TR]
</TBODY>[/TABLE]
I am able to compare all of the cells in one sheet versus the other sheet but if there is a machine that does not have 1 or more loops, the whole comparison is thrown off.
I would really appreciate any help!!