Write range activity dynamic

Hello i want to change write range activity range dynamically

  • let say for first time initial range should be A1:A10
  • after again running process that range would be B1:B10
  • again after range would be C1:C10 etc…

If you know the Column will increment each time by 1 as your example:

you can use a counter to increment the column letter as a variable and then use that as the range.

 ColumnVar + "1:" + ColumnVar + "10"

thanks @TimK for reply
how can i use that ? can you help ?

Hi @Mayur_Pawar

you can create an araay as {A,B,C} and loop it through for each item and then use read range and pass the item value as item+“1”+":"+Item.ToString+“10”

Thanks
Ashwin S

Inside a do while loop - you can create a integer counter and assign it as 1

Then use that to assign ColumnVar = Chr(Counter + 64).ToString

E.g. Chr(1+ 64).ToString = A

ColumnVar + “1:” + ColumnVar + “10”

E.g. A1:A10

Then increment the counter = counter + 1

The second loop will go to B1:B10

thanks @TimK

  • I’m getting this output were in first screenshot i got expected output. the output was I’m able to add 2200 column i.e. “I Column”

  • but in second screenshot im not getting expected output in second i expecting that 2200 data will affect on same “I column” but its got in “J column”

  • and in third it got in “K Column”

  • But rather then this i want in "I column " only when im running this process again then it will increment the counter to J column

Please Help @TimK
thanks

Can you give a bit more of an example of your workflow or an image of what your current process looks like.

Main.xaml (102.2 KB)
Master Data.xlsx (16.0 KB)
plt 1.xlsx (92.8 KB)

i have attached workflow if you open it there is “Seq of PLT 1,2 and 3 (3 sheets)” :point_left: this is my sequence name check that once.
thanks @TimK

So you want to write the same in each column first time - then move to next column after second run ?

Yes Perfect
@TimK

so remove the counter part from the loop and it will write to all 3 sheets in the same coulmn, then outside the loop add the counter.

If by second run you mean the process has stopped and started again - you will need to identify the last updated column and then use the dynamic range to use the next column.

i did this its able to add in same column but while running second time counter remain on same position not able to increment.

  • you said have to identify last updated column how can we do that ?
    thanks @TimK

@TimK any answer for above query ?
thanks
cheers :slight_smile: