How to continuous increment a count after break loop

Hi all,

I use loop(1) → do while(2) → loop(3) and break. In loop(3) i use idxArr= idxArr+1 and write into excel “A”+(2+ idxArr).ToString.

But when break loop it makes idxArr comeback = 0. How can continuously increment a count after break loop.

Thank all

Hi @anh.nguyen

Change the scope of idxArr
Put it into outer sequence where you have created if it

Can you explain more? I need put write into excel “A”+(2+ idxArr).ToString into loop(3) to then break

and want continuous increment a count after break loop . it can ?

Hi @anh.nguyen ,
You can create a variable in32 and then add 1 after the loop
Regards,

yes i am doing so, but after breaking in the loop, index will = 0. how to remember the last index and do the next.

exe: loop 1: index 4 and break
I want loop 2: index 5

@anh.nguyen

Looks like the scope if idxarr is the for loop that is inner…can you go to variable panel and change the scope to the highest sequence

Also it is necessary to increment befor ebreak if you want 5…if it is already incremented then good enough

Cheers