Sub 매크로샘플()

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

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

    Next
    
    Range("B3").Value = 합산

End Sub