I have a sheet of raw data and column J has departments and Column C has SKUs
due to a couple of the lines being split at the POS 50% in one dept and 50% in another I need to write VBA which when it comes across SKU 4321 in cell C6 will copy the contents of cell J5 into J6.
I can do this fine when there is only one Dept 'option' by using:-
Sub Testing()
For i = 1 To 50000
With Sheets("Sheet1")
If .Range("C" & i).Value = "1234" Or .Range("C" & i).Value = "1235" Then _
.Range("J" & i).Value = "NEWLINE"
End With
Next i
End Sub
But item 4321 could need correcting to one of 4 Departments but ALWAYS the same as row above.
due to a couple of the lines being split at the POS 50% in one dept and 50% in another I need to write VBA which when it comes across SKU 4321 in cell C6 will copy the contents of cell J5 into J6.
I can do this fine when there is only one Dept 'option' by using:-
Sub Testing()
For i = 1 To 50000
With Sheets("Sheet1")
If .Range("C" & i).Value = "1234" Or .Range("C" & i).Value = "1235" Then _
.Range("J" & i).Value = "NEWLINE"
End With
Next i
End Sub
But item 4321 could need correcting to one of 4 Departments but ALWAYS the same as row above.