Vlookup write cell counter

Hi all,
I have applied some vlookup formula in write cell.so in range i have write “A5”+(db2.Rows.Count).ToString but data is printing at the end .why this happened. pls help me with this

Hi Which data is printing in the end?

suggestion:- 1.create assign variable of type string

2.In the range type “A5”+dtCount

Can you show the complete vlookup statement?

Hi @ghazanfar actually it is printing all but after that it prints 0 till end .
For Example in excel suppose I have 10 rows data then upto 10 it is printing proper value after that it prints all 0.
So I thought will put counter but still it’s printing 0 after that

Hi @sayali_rokade

Please try this,

  1. Read the excel and store it in the datatable (DB2 variable name)

  2. Use write cell and give range as A2 or A5 (the starting row) and give the vlookup formula on value.

  3. Use autofill range activity and give range as “A2:A” + db2.rows.count.tostring


Hi @sayali_rokade

You need to use the index count.

if you need to write from “A”+(idx+5).toString it will write from cell A5

Create a variable idx from the properties panel of for each row and pass as above in range of write cell.

As per your expression it will write at the end because its static!

Hope the above helps!