Hi,
I am trying to write a vlookup function in Excel but nothing is working.
All I want it to do is return the value of the vlookup if it finds one or return "" if it find nothing (#!VALUE,#!N/A)
Here is my code so far :
What is the right way to write this?
Thank you for your help.
I am trying to write a vlookup function in Excel but nothing is working.
All I want it to do is return the value of the vlookup if it finds one or return "" if it find nothing (#!VALUE,#!N/A)
Here is my code so far :
Code:
Function date_test(country As String) As Variant
date_test= Application.WorksheetFunction.VLookup(country _
, Worksheets("data").Range("B12", "m999"), 12, False)
If IsError(date_test) Then date_test = ""
What is the right way to write this?
Thank you for your help.