Need help comparing reports

krimlocke

New Member
Joined
Sep 2, 2014
Messages
2
Hello Good People of Mr Excel,
If you good people would be able to help me, I am trying to compare 2 different sheets in a spreadsheet to find if the data in F3:F1000 in sheet 2 (named: OLD) are also anywhere between F3:F1000 in sheet 3 (named: NEW). If the data matches I then need it to check if the data in H3:H1000 in both sheets also matches. If it still does, I need it to populate the entire row into sheet 1 (named: COMPARE) starting in cell A3. I hope this makes sense, I tried to keep it simple, but I can give more detail if needed. Thanks in advance and I look forward to hearing from anyone willing. Thanks!!!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Someone from another site helped me, but I would like to change slightly.
The code they supplied is:


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
Dim i, j, LastRowO, LastRowN
LastRowO = Sheets("Old").Range("F" & Rows.Count).End(xlUp).Row
LastRowN = Sheets("New").Range("F" & Rows.Count).End(xlUp).Row
Sheets("Compare").Range("A3:Z2000").Clear
For i = 3 To LastRowO
For j = 3 To LastRowN
If UCase(Sheets("Old").Cells(i, "F").Value) = _
UCase(Sheets("New").Cells(j, "F").Value) Then
If UCase(Sheets("Old").Cells(i, "H").Value) = _
UCase(Sheets("New").Cells(j, "H").Value) Then
If Sheets("Compare").Range("A3").Value = "" Then
Sheets("Old").Cells(i, "F").EntireRow.Copy Destination:= _
Sheets("Compare").Range("A3")
Else
Sheets("Old").Cells(i, "F").EntireRow.Copy Destination:= _
Sheets("Compare").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
End If
End If
Next j
Next i
Target.Offset(1).Select
End Sub

What I would like to change is, have a command button I can click rather then double click and if the word DISP appears anywhere in column H then it would be ignored in the returned results.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,867
Members
449,053
Latest member
Mesh

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