mani_singh
Well-known Member
- Joined
- Jul 24, 2007
- Messages
- 583
i have the following code which looks at a list of references on design sheet col J then goes to design1 sheet finds the same ref anywhere cols A to K if found it goes along that row to col O copies the data and pastes in on design sheet sam row but col K
this all works however there are multiple instances of the ref in design 1 sheet so multiple results are returned, what i need is the macro to paste the word GD: in front of only the first result not in front of all results.
any ideas?
this all works however there are multiple instances of the ref in design 1 sheet so multiple results are returned, what i need is the macro to paste the word GD: in front of only the first result not in front of all results.
any ideas?
Code:
Sub DesignMacroGD2()
LastRow = Sheets("design").Cells(Rows.Count, 10).End(xlUp).Row
Application.ScreenUpdating = False
For i = 26 To LastRow
Target = Sheets("design").Cells(i, 10)
With Sheets("design1")
For J = 2 To 54
For K = 4 To 11
If Target = .Cells(J, K) Then
Sheets("design ").Cells(i, 11) = Sheets("design").Cells(i, 11) + "GD: " .Cells(J, 15) + " | "
End If
Next K
Next J
End With
Next i
Application.ScreenUpdating = True
End Sub