Copy range one by one

Hi,

I’m currently stuck with a process where “For Each Row” I need to “Copy from Range” a cell in column B (Example “B4”) and then paste it into another column and save the excel file as PDF. After this is done I need to go back to the Copy from Range step and then copy B5 and do the process al over again. And so on, so after B5 would be B6 and then B7 etc.

It does everything I need to do but I can’t find a formula that starts the “Copy from Range” again from a different row in Column B.

Does anybody have experience with this? Or have a formula that can execute these tasks?

Thanks!

Nick

Can you share a sample excel file…I’ll guide you with for each loop and reading and updating value.?

Also, Refer below link and download and go through the example given by uipath for better understanding

https://docs.uipath.com/activities/docs/for-each-row

Hi Pravin,

Somehow I can’t upload the excel as it says I’m a new user.

Warm regards,

Nick

@Nick_van_den_Berg - Are you working StudioX or Studio???

Your tags states StudioX - So trying to make sure before offering assistance…

StudioX!

Thanks for confirming…

Question: So just trying to copy a cell B4 to to new sheet and save it as pdf? and the proceeding B5 and save it to new sheet again to convet to pdf?? like this…???

Any sample screenshot or sample excel would help…

Yes correct.

I have an order number in “sheet3” in column B. Each row represents a different Order number and I need to copy the value (For example from B4) to “sheet1” B1 and then convert to pdf. Then I need to copy a new order number from “sheet3” (for example from B5, B6, B7 etc.) to “Sheet1” B1 and then convert that to PDF and so on.

@Nick_van_den_Berg - Got it…Why can’t you write everything to sheet1 and finally convert it to PDF, that would be easy right??

Because if you just write copy b4 and write to pdf and say 1.pdf…you can’t append it to same pdf for the next value right…then it should be 2.pdf…and so on…

The way the excel is set up now is that the value that is copied from “sheet3” column B to “sheet1” B1 generates an invoice in “sheet2”. This invoice from “sheet2” needs to be saved as PDF. Every value represents an invoice for a different client.

It already saves the PDF files with different names so everything for this is set up. The only thing missing is copying from each row.

Unfortunately I still can’t upload any document as I’m a new user

@Nick_van_den_Berg - How about this…see if this works for you…

My Input:

image

My Output:

The value from B4, B5, B6 or B7 always needs to end up in "sheet1"b1.

So the process looks like this:

  1. copy from Sheet3!B4 > paste in Sheet1!B1 > save as PDF file
  2. Copy from sheet3!B5 > paste in sheet1!B1 > save as PDF file
  3. Copy from sheet3!B6 > paste in sheet1!B1 > save as PDF file
  4. Copy from sheet3!B7 > paste in sheet1!B1 > save as PDF file
    and keep continuing until value in sheet3 column B is not filled in.

@Nick_van_den_Berg - Simple - Just removed the Auto Increment row in the write cell activity…here you go…Last value which is in Sheet3 B15 value is 1234578.

Thanks a lot!! :slight_smile:

1 Like

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