Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub CommandButton1_Click()
- Worksheets("bingbong").Activate
- Dim teplota As Integer
- Rem Dim tyden As Byte
- Dim maximum As Integer
- Dim minimum As Integer
- Dim prumer As Double
- Dim cteplota As Integer
- Dim i As Byte
- Rem tyden = InputBox("Zadej číslo týdne: ")
- maximum = -100
- minimum = 100
- prumer = 0
- cteplota = 0
- For i = 1 To 7
- teplota = InputBox("Zadej teplotu " & i & ". dne")
- cteplota = cteplota + teplota
- Next
- prumer = Math.Round(cteplota / 7, 2)
- For radek = 2 To 65536
- If Cells(radek, 2) = "" Then
- PrvniPrazdnyRadek = radek
- Exit For
- End If
- Next
- If teplota < Min Then
- minimum = teplota
- End If
- If teplota > Max Then
- maximum = teplota
- End If
- Cells(radek, 2) = prumer
- Cells(radek, 3) = maximum
- Cells(radek, 4) = minimum
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement