Moonbeam111
Board Regular
- Joined
- Sep 24, 2018
- Messages
- 85
- Office Version
- 365
- 2010
I have a code that isn't working. I'm trying to make the two ranges match each other IF there is a difference then it needs to make that cell equal to the other one.
Please assist.
VBA Code:
cell1 = Range("D22:D25")
cell2 = Range("D135:D138")
For Each cell2 In Range("D135:D138")
For Each cell1 In Range("D22:D25")
If cell1 <> cell2 Then
cell1 = cell2
End If
Next cell1
Next cell2