tommy8quko
New Member
- Joined
- Mar 27, 2017
- Messages
- 18
Hi all,I got the below two sheet with the table look like below, and I would like to compare two table column to column (with the same header), and return true if exactly the same( like the below example),and return false if anything not the same (even the sequence is not the same ).
I am new to the vba, and wanna how to do it, many thanks!
Sheet 1,
[TABLE="width: 500"]
<tbody>[TR]
[TD]Food[/TD]
[TD]Price[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]$9[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]$4[/TD]
[TD]200[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]$5[/TD]
[TD]300[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2,
[TABLE="width: 500"]
<tbody>[TR]
[TD]Food[/TD]
[TD]Supplier[/TD]
[TD]Price[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]A[/TD]
[TD]$9[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]B[/TD]
[TD]$4[/TD]
[TD]200[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]C[/TD]
[TD]$5[/TD]
[TD]300
[/TD]
[/TR]
</tbody>[/TABLE]
I am new to the vba, and wanna how to do it, many thanks!
Sheet 1,
[TABLE="width: 500"]
<tbody>[TR]
[TD]Food[/TD]
[TD]Price[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]$9[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]$4[/TD]
[TD]200[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]$5[/TD]
[TD]300[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2,
[TABLE="width: 500"]
<tbody>[TR]
[TD]Food[/TD]
[TD]Supplier[/TD]
[TD]Price[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]A[/TD]
[TD]$9[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]B[/TD]
[TD]$4[/TD]
[TD]200[/TD]
[/TR]
[TR]
[TD]Orange[/TD]
[TD]C[/TD]
[TD]$5[/TD]
[TD]300
[/TD]
[/TR]
</tbody>[/TABLE]