Hello everybody,
The code below checks if the left cell, which is 11 cells to the left of the target cell, is duplicated anywhere in column L and then copies the value in the target cell to every cell on column W that the value of the cell that is 11 cells to the left is matching the value of the target's 11 cells to the left.
The code is currently copying the valueinto every ODD row, i would like the code to copy the value into every EVEN row. How can i go about doing this?
If (Target.Row > 4) And (Target.Count = 1) And (Target.Column = 23) And (Target.Row Mod 2 = 0) Then
If Not Target.Offset(-1, -11) = "N/A" Then
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlManual
Dim mtx4(), CurrCell4, LeftCell4, i4 As Long
'Matrix of columns L:W
mtx4 = Intersect(ActiveSheet.UsedRange, ActiveSheet.Range("L:W")).Value
'Value of current cell
CurrCell4 = Target.Value
'Value of the cell left of current cell
LeftCell4 = Target.Offset(-1, -11).Value
'Comparing and set if matched
For i4 = 1 To UBound(mtx4, 1)
If mtx4(i4, 1) = LeftCell4 Then mtx4(i4, 12) = CurrCell4
Next i4
'Write matrix back to range L:W
Range("L1").Resize(UBound(mtx4, 1), UBound(mtx4, 2)).Value = mtx4
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End If
End If
It would be absolutely amazing if this issue can get resolved!
Bookmarks