none
VBS Question - Variable as VLOOKUP Look_Up parameter?

    Pertanyaan

  • Hi Folks -

    How do I use a variable as the lookup value for a vlookup formulae I'm inserting into a cell?

    Here is my code I'm trying but doesn't seem to work.  Is there a trick?

    	Dim strVlookup
    	strVlookup = objWorkbook1.Worksheets(FILE1TAB).Cells(6, strCol1).Value
    														
    	objWorkbook1.Worksheets(FILE1TAB).Cells(6, strCol2).Value = "=IFERROR(VLOOKUP(" & strVlookup & ",'" & LOCALEXPORTPATH & "[" & FILE2 & "]" & FILE2TAB & "'!A:E,5,FALSE),"""")"

    Thanks!

    Kamis, 11 Oktober 2018 18.23

Semua Balasan

  • Hi,

    According to your description, your issue is more related about VBS. And this forum is discussing and

    asking questions about the vb.net.

    Ask in the following forum.

    https://social.technet.microsoft.com/Forums/scriptcenter/en-us/home?forum=ITCG

    Thank you for your understanding.

    Best Regards,

    Alex



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Jumat, 12 Oktober 2018 03.12