Minggu, 05 April 2015

VBA VLOOKUP

09.43

'vlookup dengan input box
Sub FINDSAL()
On Error GoTo MyErrorHandler:
Dim E_name As String
E_name = InputBox("Enter the Sales person Name :")
If Len(E_name) > 0 Then
  Sal = Application.WorksheetFunction.VLookup(E_name, Sheet1.Range("B5:E17"), 3, False)
  MsgBox "Net sales is : $ " & Sal
Else
  MsgBox ("You entered an invalid value")
End If
Exit Sub
MyErrorHandler:
If Err.Number = 1004 Then
  MsgBox "Employee Not Present in the table."
End If
End Sub

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 komentar:

Posting Komentar

 

© 2013 Amanah Fitri. All rights resevered. Designed by Templateism

Back To Top