Related:
- Compare two worksheet on conditional basis
- Transfer data from one excel worksheet to another automatically - Guide
- Beyond compare - Download - File management
- Excel compare two sheets - Guide
- Transfer data from one excel worksheet to another automatically based on criteria ✓ - Excel Forum
- Excel conditional formatting if another cell contains specific text ✓ - Excel Forum
1 response
Assumption:
There are no empty cells in the name column of the first worksheet you want to compare that have only the login name and dates.
Private Sub CommandButton2_Click()
Set s = Sheets("Sheet1") 'You can rename the sheets to match your sheet names
Set r = Sheets("Sheet2")
Dim i
Dim j
i = 2
j = 2
Do Until s.Range("A" & j) = ""
If s.Range("A" & i) = r.Range("A" & j) And s.Range("B" & i) = r.Range("B" & j) Then
s.Range("C" & i) = r.Range("C" & j)
s.Range("D" & i) = r.Range("D" & j)
s.Range("E" & i) = r.Range("E" & j)
s.Range("F" & i) = r.Range("F" & j)
s.Range("G" & i) = r.Range("G" & j)
s.Range("H" & i) = r.Range("H" & j)
s.Range("I" & i) = r.Range("I" & j)
End If
i = i + 1
j = j + 1
Loop
End Sub
There are no empty cells in the name column of the first worksheet you want to compare that have only the login name and dates.
Private Sub CommandButton2_Click()
Set s = Sheets("Sheet1") 'You can rename the sheets to match your sheet names
Set r = Sheets("Sheet2")
Dim i
Dim j
i = 2
j = 2
Do Until s.Range("A" & j) = ""
If s.Range("A" & i) = r.Range("A" & j) And s.Range("B" & i) = r.Range("B" & j) Then
s.Range("C" & i) = r.Range("C" & j)
s.Range("D" & i) = r.Range("D" & j)
s.Range("E" & i) = r.Range("E" & j)
s.Range("F" & i) = r.Range("F" & j)
s.Range("G" & i) = r.Range("G" & j)
s.Range("H" & i) = r.Range("H" & j)
s.Range("I" & i) = r.Range("I" & j)
End If
i = i + 1
j = j + 1
Loop
End Sub