Im new to programming and excel. My code should include one subroutine and one function, but i dont know how to add the function.
please help me thanks!!
here is my code:
please help me thanks!!
here is my code:
Sub findServiceDescription()
Dim user As String
Dim Service As String
Dim rowCounter As Integer
Dim BankingDesc As String
rowCounter = 1
serviceNumber = Cells(rowCounter, 1).Value
user = InputBox("Please enter your service")
Do While user <> serviceNumber
rowCounter = rowCounter + 1
serviceNumber = Cells(rowCounter, 1).Value
' if banking desc is empty, output service not found
BankingDesc = Cells(rowCounter, 2).Value
If BankingDesc = "" Then
MsgBox "No Service Found"
Exit Do
End If
Loop
If BankingDesc <> "" Then
MsgBox "Banking Service: " & BankingDesc
End If
End Sub