Change formula number for each row

Hi all,
I have this formula for example “=SUM(H4:U4)” and I want the number to increase for each row. How would I do this?

Thank you

@fustian

Autofill range activity will change the number automatically

Cheers

Hie @fustian i have attached a sample flow how can you work on auto fill so it increase your formula logic have a look the code is in modern actiity as well as in classic activity too.

Auto fill Range (2).zip (117.0 KB)

cheers

Great but it’s for each sheet and each sheet has different names and I am unable to have Autofill Range read currentsheet.

@fustian i think in your post you want to increase row like formula for example pste on A1 Then A2,A3,A4 so on like this . i think you misunderstood . are you trying to apply formula on multiple sheet .

cheers

Hi @fustian,
Please try updating the incremental count for each row in the Excel sheet, similar to the example in the screenshot. This might help resolve your issue.

String.Format(“=SUM(H{0}:U{0})”, rowNumber)

You can easily change the formula to automatically adjust for each row by using relative references. Just use =SUM(H4:U4) in the first row, and then drag the fill handle (the small square at the bottom-right corner of the cell) down to copy the formula to the other rows. It will automatically update to =SUM(H5:U5), =SUM(H6:U6), and so on.

Apologies, failed to mention. I was able to find the solution for that anyways. Thank you, great workflow!

Hi Paul, this is the UiPath Forum.

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