Excel VLOOKUP formula not being recognized

I´m working on an automation that interacts with some excel files who uses a VLOOKUP formula with dynamic values and linked to an external network file. The following value is being assigned to a variable and works fine, but the problem is that when i add “=” to it. The excel file don´t recognize it as a formula and ask to repair th file. I´ve tried adding the “=” directly to the string bellow and also concatenating it to a variabale: “=”+Vlook_variable. any ideas?

“VLOOKUP(”+Letter+“4;'C:\Users\RPA\2020\13. DIR"+dirMonth+”[00. DirA.xlsx]3- From x To’!$L:$O;4;0)"

thank in advance,

1 Like


Can you first use Developer Mode in excel and manually type the vlookup expression ?

It will generate a vlookup formula in VBa , which you could use it in the Uipath Studio .

thanks for your reply.

The formula without the = is written inside excel without problem and if i add the = manually it works as expected. But i can´t make it set the = at once through the RPA automation.

it generates the following formula : VLOOKUP(M4;‘C:\Users\RPA\2020\13. DIR\04. April[00. DirA.xlsx]3- From x To’!$L:$O;4;0).

How you are writing the value in excel @Bern? I’m confused by the word external network file here, do you mean online file?

Usually, when we assign the formula (including ‘=’) to a variable and pass it to the excel using write cell activity, it will work for sure

Hi @HareeshMR,
this is exactly what i have inside the spreadsheet and working when i manually add the ‘=’: =VLOOKUP(M4;‘C:\Users\RPA\2020\13. DIR\04. April[00. DirA.xlsx]3- From x To’!$L:$O;4;0)

the RPA write cell the “VLOOKUP(M4;‘C:\Users\RPA\2020\13. DIR\04. April[00. DirA.xlsx]3- From x To’!$L:$O;4;0)” nicely

but i have to manually add the ‘=’

the external network file i mean is because the official directory is a network dir, something like \server\process\2020\13. BP\04. April[00.Assumptions.xlsx]3-From x To in place of C:\Users\RPA, that is the local test.

I´ve found what was generating the problem with this vlookup formula. The semicolon ( ; ) was creating the error. Changing it to comma (,) solved it. Now is working beautifully.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.