I have the following code which works well but i now need to copy J & K if the condition is met
I have tried a couple of ways but cant get it to work so use same module but for J it would be much quicker if i could do them both together as there are often about 4-500,000 lines of data but on other occasions only 2000 lines.
Sub Addonx()
Linez = InputBox("How many LINES to process" & vbCr & "figure From Message Box")
For i = 1 To Linez
With Sheets("Dept Rept")
If .Range("D" & i).Value = "17354" Then _
.Range("K" & i).Value = "=R[-1]C"
End With
Next i
End Sub
Thanks for the help
I have tried a couple of ways but cant get it to work so use same module but for J it would be much quicker if i could do them both together as there are often about 4-500,000 lines of data but on other occasions only 2000 lines.
Sub Addonx()
Linez = InputBox("How many LINES to process" & vbCr & "figure From Message Box")
For i = 1 To Linez
With Sheets("Dept Rept")
If .Range("D" & i).Value = "17354" Then _
.Range("K" & i).Value = "=R[-1]C"
End With
Next i
End Sub
Thanks for the help