1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Sub Comparer()
Dim FeOr As Worksheet
Dim FeEnt As Worksheet
Dim Plage As Range
Dim Cel As Range
Set FeOr = Worksheets("Origine")
Set FeEnt = Worksheets("Entreprise")
With FeOr
Set Plage = .Range(.Cells(2, 1), .Cells( _
.Cells.Find("*", .Cells(1, 1), -4123, , 1, 2).Row, _
.Cells.Find("*", .Cells(1, 1), -4123, , 2, 2).Column))
End With
For Each Cel In Plage
If Cel.Value = FeEnt.Cells(Cel.Row, Cel.Column).Value Then
FeEnt.Cells(Cel.Row, Cel.Column).Interior.ColorIndex = 3
End If
Next Cel
End Sub |
Partager