Sub Traceability()
Dim i As Long
Dim j As Long
Dim k As Long
Dim CheckReq As String
i = 1
j = 1
Sheets("Req").Select
Do While Not IsEmpty(Sheets("Req").Cells(i, 1))
Sheets("Req").Select
CheckReq = RTrim(Sheets("Req").Cells(i, 1))
Sheets("Req").Rows(i & ":" & i).Select
Selection.Copy
Sheets("Availability").Select
Sheets("Availability").Rows(j & ":" & j).Select
ActiveSheet.Paste
k = 1
Do While Not IsEmpty(Sheets("TestSpec").Cells(k, 1))
If (RTrim(Sheets("TestSpec").Cells(k, 1)) = CheckReq) Then
Sheets("Availability").Select
Sheets("Availability").Cells(j, 13) = "Available in Test Spec"
Exit Do
End If
k = k + 1
Loop
'This below variables for Req
j = j + 1
i = i + 1
Loop
End Sub
Dim i As Long
Dim j As Long
Dim k As Long
Dim CheckReq As String
i = 1
j = 1
Sheets("Req").Select
Do While Not IsEmpty(Sheets("Req").Cells(i, 1))
Sheets("Req").Select
CheckReq = RTrim(Sheets("Req").Cells(i, 1))
Sheets("Req").Rows(i & ":" & i).Select
Selection.Copy
Sheets("Availability").Select
Sheets("Availability").Rows(j & ":" & j).Select
ActiveSheet.Paste
k = 1
Do While Not IsEmpty(Sheets("TestSpec").Cells(k, 1))
If (RTrim(Sheets("TestSpec").Cells(k, 1)) = CheckReq) Then
Sheets("Availability").Select
Sheets("Availability").Cells(j, 13) = "Available in Test Spec"
Exit Do
End If
k = k + 1
Loop
'This below variables for Req
j = j + 1
i = i + 1
Loop
End Sub