sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I'm trying to copy data across to another sheet if a condition is met.
The condition is the value 'Unresolved' in column K - this is what I have so far;
The issue is that is finds the first row where that condition is met and copies the data across fine, but stops there and does no more.
Can anyone advise where I am going wrong please?
The condition is the value 'Unresolved' in column K - this is what I have so far;
Code:
Nextrow = Sheet14.Range("A65536").End(xlUp).Row + 1
For Each cell In Sheet7.Range("A2:A" & LastRow)
If cell.Offset(0, 10).Value = "Unresolved" Then
Sheet14.Range("A" & Nextrow).Value = cell.Offset(0, 2).Value
Sheet14.Range("B" & Nextrow).Value = cell.Offset(0, 3).Value
Sheet14.Range("C" & Nextrow).Value = cell.Offset(0, 6).Value
Sheet14.Range("D" & Nextrow).Value = cell.Offset(0, 7).Value
Sheet14.Range("E" & Nextrow).Value = cell.Offset(0, 8).Value
Sheet14.Range("F" & Nextrow).Value = cell.Offset(0, 9).Value
Sheet14.Range("G" & Nextrow).Value = cell.Offset(0, 10).Value
End If
Next
The issue is that is finds the first row where that condition is met and copies the data across fine, but stops there and does no more.
Can anyone advise where I am going wrong please?