This project has moved. For the latest updates, please go here.

Vlookup Formula issues

Mar 29, 2012 at 1:35 PM

Hi,

Is there some way to do that formula with referenced values of a table?

Example:

ws.Cells[1,1].Formula = "=VLOOKUP(\"" + tableName + "\"[[#ThisRow],[ColumnName]],sheetname!A:B,2,0)";

I'm getting an error "Excel found content that can't be read...".

Thanks.

 

Mar 29, 2012 at 4:18 PM

Hi,

I've found the problem.

I don't know if the excel version has something to do with that.

But i'm using portuguese version of Excel and the formula works this way:

ws.Cells[1,1].Formula = "=VLOOKUP(" + tableName + "[[#This Row],[" + ColumnName + "]],sheetName!A:B,2,0)";

I didn't have to use double quotes on string parameters like is said on documentation.