I’ve got the following bit of code that copies rows from one sheet to another if it is the same region that has been selected in a combo box. The problem I have is that it is copying into row 5 rather than row 6 and copying over the column titles. Do you know why this might be happening? I thought the fourth line starting "Worksheets("NLE_").Range("A")... would pick the first empty row i.e. A6, but it picks A5?
If chkNLE.Value = True And cboLA = "All" Then
LastRow = Worksheets("NLE_").Range("A" & Rows.Count).End(xlUp).Row *– clears any data that is already in the worksheet*
Worksheets("NLE_").Range("A6:W" & LastRow).Clear
For Each i In Sheets("NLE").Range("NLEregion") *– NLEregion is a named range for the column with region in it in the sheet when the data is being copied from*
If i.Value = cboRegion.Value Then
i.EntireRow.Copy
Worksheets("NLE_").Range("A" & Rows.Count).End(xlUp).Offset (1)
Sheets("NLE_").Visible = True
Sheets("Front Page").Visible = False
UserForm1.Hide
End If
Next i
End If