I don’t know if the code highlighting works with indented code blocks. You may need to use three backticks eg. ```vb
Sub test()
Dim x As Long
With ActiveCell
For i = 1 To 1000
x = 91 * i
If Right(x, 2) = "22" Then
ActiveCell.Offset(m).Value = i
m = m + 1
End If
Next i
End With
End Sub