Write variable text in Excel cells, one by one with COUNTER

Hi all!

I’m getting a text with regex and it’s stored in Value variable. It’s inside a For Each activity and what I want is to write each value of Value variable in cell below of excel.
Something like this:
1

The Counter value is initialized in 0 but it doesn’t increment for each Variable value.
How can I solve this?

Regards,
J.

Few inputs

Counter should be of type int

to increment do Counter = Counter+1 (not Counter + “1”)

in the write cell → “A”+ Counter.ToString

"A"+Counter.ToString

Think you had a typo :slight_smile:

1 Like

Also check the scope of Counter variable.
If it’s inside the loop, it will get out of scope and reinitialized with each iteration:

Like this (what you’re probably getting):

Instead of what you want, like this:

1 Like

Thanks all! All answers help me to achieve it! :smiley: