اذهب الي المحتوي
أوفيسنا

تعريف وشرح دالة VLOOKON


إلين
إذهب إلى أفضل إجابة Solved by Ali Mohamed Ali,

الردود الموصى بها

  • أفضل إجابة

اهلا بك فى المنتدى شرفتنا,شرح هذه الدالة كالتالى:

image.png.f983e2b4c6bf278eb651fa7fd07b1aab.png

وهى دالة معرفة وهذا هو الكود المرافق للدالة لحسن عملها

Function VLOOKON(ParamArray My_Arg()) As Variant
Dim Max As Integer
Dim Index As Integer
Dim FindOK As Boolean
Dim MyFind As String
Dim CIndex As Integer
MyFind = My_Arg(0)
CIndex = My_Arg(1)
Max = UBound(My_Arg)
FindOK = False
For Index = 2 To Max
If FindOK Then Exit For
    VLOOKON = My_Arg(Index).Name
    R = Range(VLOOKON).Rows.Count
    C = Range(VLOOKON).Columns.Count
    If CIndex > C Then VLOOKON = "#REF!": Exit Function
        For MyR = 1 To R
        If LCase(Range(VLOOKON)(MyR, 1)) = LCase(MyFind) Then
            VLOOKON = Range(VLOOKON)(MyR, CIndex)
            Exit Function
        End If
        Next MyR
Next Index
VLOOKON = "#N/A"
End Function

وهذا ملف ايضا به مثال يبين تطبيق الدالة لحسن استخدامها

 

VLOOKON With No Limitation.xls

  • Like 3
  • Thanks 1
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information