i just posted a sample code, not the perfect as u need, it just loop rows 1 to 100, u can find the last used row in column N like this
Code:
Dim LastRow as Integer
LastRow = Cells(Rows.Count, "N").End(xlUp).Row
then put the lastrow in loop
Code:
For i = 1 To LastRow