How to increase the numbers in a column

Hello.

I’d like to automate this part increasing the values.

image

Desired output :

image

It will be larger than 6 but I need help with the logic, please.

I did it with fill range activity but It replicated the last number 2 in all the cells.

Help, please.

Thanks.

I’ve upload the excel file.
numbers.xlsx (8.2 KB)

Hi @pprin001,
Use read range activity to get the data into datatable.

Create intcounter=1 variable
Inside for each row
Assign row(“Id”)=intCounter.ToString()
&
IntCounter=IntCounter+1

Then use write range to write in excel.

Regards,
Arivu

1 Like

Hi @pprin001

First format the id column to number and then use autofill range activity

Regards
Sudharsan

1 Like

Hello @pprin001
Refer to this Xaml file you may Get Some idea
Forum_NumberAutoFill.zip (143.2 KB)

image

Use Excel Modern Actvity.
If You are classic user, Enable activity vy following these steps:
Click Actvity pannel> Click Filter> Enablke the Show modern option.
image

1 Like

HI @pprin001

You don’t need to Use Assign activity for counter.

In the For each row in DataTable activity itself having the Index, So you can create the variable there.

Inside the Loop Use only one Assign activity

CurrentRow("Id") = indexCounter

Regards
Gokul

2 Likes

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