Hi, i have a vba code with row.count. it does not increase the row count. My test@hotmail.com is n1=3. But n1 always stops at 2. Please help
Code:
Sheets("Account Details").Visible = True
Sheets("Account Details").Select
NextRow1 = Application.WorksheetFunction.CountA(Range("A:A")) + 1
Set r1 = Range(Cells(1, 1), Cells(NextRow1, 1))
For n1 = 2 To r1.Rows.Count
If Cells(n1, 1).Value = "test@hotmail.com" Then
MsgBox "HO"
Else
MsgBox "hi"
End If
Next n1