VLookUp

hello,

I run this code:

Excel.Range rng = (Excel.Range)custWS.get_Range("A1", "B" + custWS.UsedRange.Rows.Count.ToString());

exObj.WorksheetFunction.VLookup(((Excel.Range)sourceWS.Cells[i,1]).Value2.ToString(), rng, 2, false);

and I get this error:

VLookup method of WorksheetFunction class failed

please help me understand what is the problem

thanks




Answer this question

VLookUp

  • rautchetan

    Hi,

    You must give more info about the WorksheetFunction and what you exactly want to do, so we can help you figure it out .

    Thank you



  • VLookUp