Type an excel formula and increment it

Hello,

I want to type this formula on a column and I use write cell activity (excel activities).

This is the formula =TEXT(I2,“YYYYMMDD”) , but I have problem with the quotes. I can’t write “=TEXT(I2,“YYYYMMDD”)” also I need to increment the formula at each row. I mean, in the next row to be =TEXT(I3,“YYYYMMDD”) then =TEXT(I3,“YYYYMMDD”).

1 Like

@adrianab.98

Try like this . Double quotes(") are escaped using a double double quotes("")

"=TEXT(I2,""YYYYMMDD"")"

And you can write it in first cell using write cell and then use auto fill range activity to fill the formula in all the rows and it will change the cells automatically

https://docs.uipath.com/activities/docs/excel-auto-fill-range

cheers

Hi,

Hope the following sample helps you.

Sample20221220-4.zip (8.2 KB)

Regards,

Hi, thank you.

What if I don’t know the row count, and I don’t know until each row to increment.

Hi,

We can use currentIndex variable in ForEachExcelRow as the following.

Can you try this?

Sample20221220-4v2.zip (8.7 KB)

Regards,

Doesn’t work

Hi,

Please input same as my sample.

Regards,

1 Like

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