How to refer previous sheet and copy data to latest sheet on excel file?

Hello, all

I need to copy data from specific range to another excel sheet but the problem is we’re unable to specify sheet name.
So, can I copy data from previous sheet to last sheet?
Please refer to below image.
A2:A15 data needs to be copied to SheetB C2:C15

Thank you always!!


Check as below

I have two sheets, so to retrive the sheet1 I used Excel Application scope and activity called Get Workbook Sheets, So this will output you all the sheet names in an array

After that using the Sheets(Sheets.count-2) I can get previous sheet, For getting the Last sheet you can use Sheets(Sheets.Count-1)

Hope this may help you


1 Like

I really appreciate for your helps!!
It was the key solution! :slight_smile:

1 Like

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