Informatyka - Odpowiedzi kolokwium

Nasza ocena:

3
Pobrań: 28
Wyświetleń: 490
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Informatyka - Odpowiedzi kolokwium  - strona 1

Fragment notatki:

Zadanie 4
Sub tabela() Dim i As Integer
Dim j As Integer
Dim x As Integer x = 1 For i = ActiveCell.Row To ActiveCell.Row + 9 For j = ActiveCell.Column To ActiveCell.Column + 9 Cells(i, j) = x x = x + 1 Next j Next i End Sub
Zadanie 5
Function trojka(tablica As Variant) As Variant Dim zbior As Variant,
Dim s As Integer
Dim x As Integer
Dim m As Integer
Dim n As Integer
Dim i As Integer
Dim j As Integer
Dim r As Range Set r = Selection If IsArray(tablica) Then zbior = tablica s = 0 n = UBound(zbior, 2) - LBound(zbior, 2) + 1 'kolumny m = UBound(zbior, 1) - LBound(zbior, 1) + 1 'wiersze For i = tablica.Row To tablica.Row + m - 1 For j = tablica.Column To tablica.Column + n - 1 x = Cells(i, j).Value If x Mod 3 = 0 Then s = s + 1 End If Next j Next i trojka = s Else trojka = "argument musi byc tablica" End If End Function
... zobacz całą notatkę

Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz