How can I restrict the search of from B6 to LastRow For Each ws In…
- User
How can I restrict the search of from B6 to LastRow
For Each ws In ThisWorkbook.Worksheets If Len(ws.Name) = 3 Then lastRow = ws.Cells(ws.Rows.Count, "B").End(xlUp).Row For i = 1 To lastRow 'If ws.Cells(i, "B").Value = "Remind" Then 'If ws.Cells(i, "B").Value = "Reminder" Then If ws.Cells(i, "I").Value = "" Then reminderSheet.Cells(reminderRow, "D").Value = ws.Cells(i, "J").Value reminderSheet.Cells(reminderRow, "E").Value = ws.Cells(i, "L").Value reminderSheet.Cells(reminderRow, "F").Value = ws.Cells(i, "C").Value reminderSheet.Cells(reminderRow, "G").Value = ws.Name reminderRow = reminderRow + 1 End If Next i End If Next ws
- Assistant
To restrict the search to only the range B6 to LastRow, you can modify the For loop as follows:
For i = 6 To lastRow ' Rest of the code Next i
This will start the loop from Row 6 instead of Row 1 and go up to the LastRow value.