Dim i As Integer, j As Integer, n As Integer, m As Integer
Dim z() As Integer, max() As Integer, min As Integer
n = InputBox("Введите число строк")
m = InputBox("Введите число столбцов")
ReDim z(n, m)
ReDim max(m)
For i = 1 To n
For j = 1 To m
z(i, j) = Rnd * 100 - 50
Cells(i + 2, j + 2) = z(i, j)
Next
Next
For j = 1 To m
For i = 1 To n
If max(j) < z(i, j) Then max(j) = z(i, j)
Next
Next
min = 100
For j = 1 To m
Cells(n + 4, j + 2) = max(j)
If max(j) < min Then min = max(j)
Next
Cells(n + 6, 3) = min