• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Encapsulated functions in Excel VBA

Shay A

Member
Hi everyone :)
Is it possible to use a function within a function in my code?
For example,

application.worksheetfunction.ifna(vlookup(A2,My_Array,2,0),"qqq)

Thanks in advence!
Shay
 
You may consider writing your own function which combines the two if it is something you need regularly:
Code:
Function func1(a As Range, b As Range, c As Integer, d As Integer, e As String)
    func1 = Application.WorksheetFunction.ifna(Application.WorksheetFunction.VLookup(a, b, c, d), e)
End Function
 
Back
Top