Hello Everyone,

I need help writing excel formula to write cell activity.

When I want to write the Excel formula as text, I get an error like this.

Can you help me please?

Hello Everyone,

I need help writing excel formula to write cell activity.

When I want to write the Excel formula as text, I get an error like this.

Can you help me please?

Hi @korhansuren

Welcome to UiPath Community

You can watch this video. It could help you.

I think your formula is not correct. You have two )) but you only need one.

Best regards

Mahmoud

1 Like

I watched this but it didnâ€™t help me. The problem Iâ€™m having is in formulas written with words. I donâ€™t have a problem with simple formulas like =a2+b2. vlookup, sum etc. When I write formulas with words, I get an error like this.

Can you please share your excel file?

Hi,

the error message says â€śuse commas as parameters separatorâ€ť.

You used semicolons. Try using commas instead.

IMBook1.xlsx (11.0 KB)

here.

Iâ€™m in Turkey. Excel format automatically writes the formula in this way due to region and language settings. When I write the same formula in excel, it works fine.

It works for me:

â€ś=VLOOKUP(E2,Supersmart!A:A,1,0)â€ť

But your formula is not correct. There are only #N/A values.

because I only sent you a few lines of data. The actual file is 500k lines.

By the way, when I try the formula you gave, I get an error like this. I guess itâ€™s because of the region/language settings.

Can you please try this in your Write Cell activity:

â€ś=VLOOKUP(E2;Supersmart!A:A;1;0)â€ť

I donâ€™t know why it doesnâ€™t work for you.

Check the properties of the activity Excel Scope Application.

I have these:

options is same for my side.

me too, i donâ€™t know.

You can also do it with Invoke Code. It is better and faster. See attached file:

Sequence35.xaml (5.4 KB)

You need to import this package to your UiPath Studio:

Microsoft.Office.Interop.Excel

Dim xlApp As Microsoft.Office.Interop.Excel.Application = New Microsoft.Office.Interop.Excel.Application

Try

Dim xlWorkbook As Microsoft.Office.Interop.Excel.Workbook = xlApp.Workbooks.Open(Path)'Define Excel Sheet

Dim xlWorksheet As Microsoft.Office.Interop.Excel.WorksheetxlWorksheet = CType(xlWorkbook.Sheets(â€śDataâ€ť), Microsoft.Office.Interop.Excel.Worksheet)

'Activate Worksheet Data

xlWorksheet.Activate()'Write Formula in Cells: F2 to F30

xlWorksheet.Range(â€śF2:F30â€ť).Formula=â€ś=VLOOKUP(E2,Supersmart!A:A,1,0)â€ť'Save Workbook

xlWorkbook.Save'Close Workbook

xlWorkbook.CloseCatch ex As Exception

Throw ex

Finally

'Close Excel Application

xlApp.Quit

End Try

1 Like

Hello Korhan,

Here I have multiple ways how to do VLOOKUP (including multiple files):

Thanks,

Cristian

1 Like

Even when the parameters separator is semicolon (or something else) in Excel, you need to use comma in UiPath when writing formulas to Excel. Once the formula is written to Excel, it automatically changes to correct separator (from comma to semicolon in this case).

1 Like

Very helpful, thank you.

You should use , instead of ; in the formula.

=VLOOKUP(E2,Supersmart!A:A,1,0)