Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub aaa()
- Dim a As Double
- Dim i As Variant
- Dim suma As Double
- Dim j As Double
- suma = 0
- For j = 1 To 10
- Cells(j, 1).Value = Clear
- Next j
- For i = 1 To 10
- Cells(i, 1) = InputBox("wpisz liczbę " & i)
- If Cells(1, 1) = "end" Then
- MsgBox ("brak danych")
- Exit For
- End If
- If i > 1 And Cells(i, 1) = "end" Then
- suma = suma + Cells(i - 1, 1).Value
- Cells(i + 1, 1) = suma
- Exit For
- Else: suma = suma + Cells(i, 1).Value
- Cells(i + 1, 1) = suma
- End If
- Next i
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement