I'm having issues while running this code. Whenever I do it step by step while pressing F8 it works but whenever I run it skips the Rows(R).EntireRow.Insert
line which is the most important. Thank you!
Sub AddARow()
Dim R As Long
Dim FoundCell As Range
Dim revF As Long
Dim nbUnit As Long
Dim moyenneM As Long
Set FoundCell = Sheets("Étude").Range("C1:C200").Find(what:="xxxxx")
R = ((FoundCell.Row) + 2)
Rows(R).EntireRow.Insert
Cells(R, 3).Value = "Moyenne mensuelle par condo"
nbUnit = Cells((R + 4), 4).Value
For i = 4 To 33
revF = Cells((R - 1), i).Value
moyenneM = revF / nbUnit
Cells(R, i).Value = moyenneM / 12
Next
Call AutoFill_TB
End Sub