Sub Userform1_Initialize()
For i = 975 To 1301
ComboBox1.AddItem i
Next i
End Sub
Private Sub CommandButton1_Click()
For j = 8 To 32
If ComboBox1.Value < Cells(j, 6) Then
Label1.Caption = Cells(j, 2)
End If
Next
End Sub
Function otbetus(R As Range) As Integer
otbetus = 0
For Each x In R
If x = "" Or IsNumeric(x) = True Then
MsgBox ("Ne írj számokat ,és ne hagyd üresen pls.")
End If
If Len(x) = 5 Then
otbetus = otbetus + 1
End If
Next
MsgBox ("Ennyi cellában van öt betűs szó: " & otbetus)
End Function
Sub elso()
Dim i As Integer
nev = InputBox("Mondd a nevet! ")
For i = 9 To 32
If Cells(i, 2).Value = nev Then
MsgBox Cells(i, 1)
End If
Next
End Sub