Index Value Increment in For each loop

I have a problem, where there is 4 id’s (string format),how I will get the four id’s???
I think For each loop is correct choice for this. But how I will increment the index value of the id’s which I assign under a variable. Please guide me.

@nirmalya.sarkar,

Welcome to UiPath Communiity!

You can try with Enumerable.Range(0,4) in a For each Loop,

Refer this link for more details: Enumerable.Range(Int32, Int32) Method (System.Linq) | Microsoft Docs

for better help, let us know what you are trying actually, from where (Variable) you want to get the IDs

I have to do my project in VB mode (C# is not allowed). I have to do a project where I have to show the output in excel file. (consists of item name, price and saved amount). In this project I have to select 4 ASIN no. and with the help of it process will extract those data (item name, price and saved amount) for each id’s. How will I use the For loop concepts here???

For Each automatically gives you an incrementing counter built in. Just put a variable into the Index property of the For Each activity. Then reference that variable to see which Index (loop number) you are on.