I'm currently working on a small macro that inserts a row if one of the following columns are a different number. I have the below peice of code but cannot understan why this isn't working.
Could anyone point out my mistake?
Sub Button1_Click()
Dim rowCount As Integer
rowCount = 10
If cell(rowCount, 2) <> cell((rowCount + 1), 2) Then
Rows(rowCount).Insert
rowCount = rowCount + 2
ElseIf cell(rowCount, 2) = cell((rowCount + 1), 2) Then
rowCount = rowCount + 1
End Sub