This is my exercise:
there is a file in Excel with in column A the names of the mountains and the height in column B. I have to write a subprocedure that determines the average of the heights and the heighest mountain and writes the name in a MsgBox.
The previous part of the exercise goes as following:
Option Explicit
Sub bergen()
Dim histogram(13) As Integer
Dim frequentietabel(13) As String
frequentietabel(1) = "100 - 200 m"
frequentietabel(2) = "200 - 300 m"
frequentietabel(3) = "300 - 400 m"
frequentietabel(4) = "400 - 500 m"
i = 2
Do While Not Worksheets("bergen").Cells(i, 2) = ""
hoogte = Worksheets("bergen").Cells(i, 2)
histogram(hoogte \ 100) = histogram(hoogte \ 100) + 1
i = i + 1
Loop
x = vbCr
i = 1
For i = 1 To 13
x = x & histogram(i) & vbCr
Next i
MsgBox x
End Sub
Now I have no idea how to begin. Is it possible to start from the previous part of the exercise or does it have to be a new procedure?
Thanks!