Sub 매크로샘플()

    Dim i As Long
    Dim r As Long
    
    Range("B3:B100").ClearContents
    r = 5
    
    For i = 1 To 50 Step 2

        Range("B3").Value = Range("B3").Value + i
        Range("B" & r).Value = i
        r = r + 1
        
        If Range("B3").Value > 30 Then
        
            Exit For
        
        End If

    Next

End Sub