Help to compare two sheets

nhnn1986

Board Regular
Joined
Oct 12, 2017
Messages
92
Hi all
I have two sheet(A) and sheets(B), now I want to compare with three conditions and color row(j) in sheet(B) if wrong
Conditions that:
1. Mid(sheet(A).row(i) = Mid(sheet(B).row(j)= "201808-5600"
2. Sheet(A).row(i,2) = "1011"
3. Sheet(A).row(i,3).value/1000 = Sheet(B).row(j,2).value

How can I do that by VBA code

Thanks./.

Sheet (A)
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]A000-201808-56000-123[/TD]
[TD]1011[/TD]
[TD]100000[/TD]
[TD]...[/TD]
[/TR]
[TR]
[TD]B001-201807-56001-123[/TD]
[TD]1012[/TD]
[TD]150000[/TD]
[TD]...[/TD]
[/TR]
[TR]
[TD]A001-201807-56004-123[/TD]
[TD]4501[/TD]
[TD]200000[/TD]
[TD]...[/TD]
[/TR]
[TR]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[TD]...[/TD]
[/TR]
</tbody>[/TABLE]









Sheet(B)
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]B001-201808-56000-123456[/TD]
[TD]100[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B001-201808-56000-123456[/TD]
[TD]150[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,225,760
Messages
6,186,874
Members
453,381
Latest member
tcell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top