8 Ways To Copy Data From One Excel Sheet to Another

Learn how to copy data from one Excel sheet to another by following along with this effortless Excel tutorial.

Ever found yourself staring at an Excel spreadsheet, wishing you could just snip and paste data from one sheet to another? Well, you can!

Copying data between Excel sheets is a handy skill that can save you time and effort. In this guide, I’ll break down the process into simple steps, so you can become an Excel data-moving master. Let’s get started!

Copy-Paste With Keyboard Shortcuts

The easiest way to copy Excel data from one sheet to another is the copy-and-paste method.

Here, you can use different ways and shortcut keys to copy an Excel worksheet in various ways.

Select whole dataset
Select whole dataset

Select the first cell, A1 in the worksheet and press Ctrl + A to copy the entire dataset as shown in the above image.

In this approach, Excel first selects all of the contiguous rows and columns of the dataset. Nonadjacent cell ranges or the same worksheet’s datasets won’t be copied first.

Sample dataset 1
Sample dataset

Suppose, your worksheet looks something like the above.

Press select hotkey once
Press select hotkey once

To select all the data from the active worksheet, press Ctrl + A twice.

Select entire worksheet
Select entire worksheet

Excel will select the entire worksheet.

Select column until next blank cell
Select column until next blank cell

Another way to select a certain part is to use the Ctrl + Shift + Right Arrow or Down Arrow hotkey.

Select entire row until the next blank cell
Select entire row until the next blank cell

It selects the entire row or column respectively until the next empty cell.

Paste copied data
Paste copied data

Once you’ve copied the source dataset from the active worksheet, navigate to the destination sheet. It might be in the same workbook or a different one.

Select the first cell of the destination cell range and press Ctrl + V to paste the copied data. Here, you don’t need to select the entire destination cell range because that would unnecessarily take more time. Excel will automatically adjust the pasted data.

For instance, you’ve copied source data from the A1:I6 cell range. Now, you want to paste it in the K1:S6 cell range. You only need to select K1 in this situation.

Drag and Drop Data Using the New Window Command

In this method, you can visualize both the source and destination worksheet on one screen. Also, you can use the drag-and-drop movement to copy Excel data from one sheet to another.

New Window command
New Window command

Go to the source data worksheet and click on the View tab. Find the New Window command inside the Window commands block. Click on that to open a new window of the same workbook.

You’ll see the new window on the top. The active worksheet would be the source sheet. So, navigate to the destination worksheet in the new window.

Click anywhere on the sheet and press the Windows + Right Arrow keys together to snap the new window to the right half of the screen.

Now, you should see the source data sheet. Select any cell on that and press the Windows + Left Arrow hotkey to snap the window to the left half.

The layout of both windows
The layout of both windows

Both the worksheets will be in front of you.

Select data and press Ctrl
Select data and press Ctrl

Select a dataset in the source worksheet and hit the Ctrl key.

Drag the selection to the destination
Drag the selection to the destination

Now, drag and drop it onto the destination worksheet on the right side of the screen.

Drop to copy dataset
Drop to copy dataset

Excel copies data when you drop the selected dataset.

If you need to copy to a worksheet of a different Excel file, you can just open that worksheet and press Windows + Right Arrow to snap to the right. No need to use the New Window command in this case.

Copy Data Using the Paste Link Command

The Paste Link option in Excel is used to create a dynamic link between cells or data across different worksheets or workbooks. When you paste a link, the destination range references the original cell range, meaning any changes made to the source data automatically update in the linked cells.

Copy source data
Copy source data

To use Paste Link, go to the source worksheet and copy the intended dataset.

Paste Special
Paste Special

Now, navigate to the destination worksheet, which can be the same workbook or a different Excel file.

Select a cell or cell range and press Ctrl + Alt + V to open the Paste Special dialog box.

Click on the Paste Link button in the bottom left corner of the dialog box.

Click OK to insert the copied data as a dynamic link that updates in real time.

Copy data from one Excel sheet to another using Paste Link
Copy data from one Excel sheet to another using Paste Link

Excel pastes the data in the destination.

If you’ve copied the dataset to a different workbook, both the Excel files must be open so that Excel can update the dataset dynamically.

Using an Excel Formula

You can also copy datasets from one worksheet to another using an Excel formula that creates a reference of the copied data in the destination cell range. Like the Paste Link method, data updates dynamically when you change the source worksheet content.

Source database
Source database

For example, you want to copy the dataset in D1:F6 of the database shown above to A1:B6 of Sheet2 in the same workbook.

Excel formula
Excel formula

Go to the destination worksheet and select the first cell of the destination range.

There, enter the following formula and hit Enter:

Copied data using a formula
Copied data using a formula
=Sheet3!$D$1:$F$6

Excel will create a dynamic link in A1:B6 of the copied cell range from the source sheet.

Formula for a different workbook
Formula for a different workbook

If the destination worksheet is on a different workbook, use the following formula instead:

='[Copy Data From One Excel Sheet to Another.xlsx]Sheet3'!$D$1:$F$6

In the above formula, the codes within single quotes represent the name of the source data workbook and worksheet. So, modify this part as well as the cell range reference.

📒 Read More: 5 Ways to Pull Data From Another Sheet in Microsoft Excel

Copy Data Using a Defined Name

Define Name command
Define Name command

Select the source dataset and navigate to the Defined Names block of the Functions tab.

Click on the Define Name command to view the New Name dialog box.

New Name dialog
New Name dialog

Use the New Name wizard to define a name for the dataset by entering relevant information in fields, like Name, Scope, and Comment.

The Refers to field should automatically show the selected dataset’s cell range.

Click OK to save the name.

Type initials
Type initials

Now, go to the destination worksheet and select the cell as the anchor cell to copy the source data.

Enter the equals sign and type the Defined Name that you’ve just created.

Excel will show automated suggestions if you type the initials. Click on the Defined Name that populates in the auto-suggestion.

Imported a dynamic link of the copied data
Imported a dynamic link of the copied data

Excel will copy and paste the source data into the intended cell range.

However, if you change the source data, the dataset in the destination cell range will reflect that in real-time.

Using the Excel Table Tool

Create Table
Create Table

Transform your dataset into an Excel table by selecting it and pressing the Ctrl + T keys together.

Click OK on the Create Table dialog box.

Table
Table

Excel will convert the data into a table.

Find table name
Find table name

Click anywhere on the table and go to the Table Design tab.

Note the Table Name entry in the Properties block.

Auto suggestion box
Auto-suggestion box

Now, go to the destination worksheet and select a cell you want to use the anchor.

Type in an equals sign and enter the table name as is.

Copy data using Table
Copy data using Table

Select the table object of the same name from the auto-suggestion context menu and hit Enter.

The source table will show up in the destination worksheet with the dynamic linking feature.

If you change the source table data, it’ll reflect in the destination worksheet.

Copy Data Using Excel VBA

If you wish to automate the process of copying and pasting data from one worksheet to another, you can use Excel VBA.

In this section, I’ve outlined two VBA scripts for copying data to a worksheet of the same workbook and for a sheet in a different workbook.

If you’re new to Excel VBA, check out this Microsoft Excel tutorial to find out the technique to create a VBA macro from a script:

📒 Read More: How To Use The VBA Code You Find Online

If you know how to set up a VBA macro or have gone through the above tutorial, try out the following scripts:

VBA script 1
Sub CopyRangeToAnotherSheet()
    Dim sourceRange As Range
    Dim destSheetName As String
    Dim destAddress As String
    Dim destSheet As Worksheet
    Dim fullAddress As Variant

    ' Prompt to select the source range
    On Error Resume Next
    Set sourceRange = Application.InputBox("Select the range to copy using your mouse:", Type:=8)
    On Error GoTo 0
    
    If sourceRange Is Nothing Then
        MsgBox "No range selected. Exiting."
        Exit Sub
    End If

    ' Prompt to enter the destination sheet and address
    destAddress = InputBox("Enter the destination sheet name and cell address in this format Sheet6!A1:")

    If destAddress = "" Then
        MsgBox "No destination address entered. Exiting."
        Exit Sub
    End If

    ' Split the input into sheet name and cell address
    fullAddress = Split(destAddress, "!")
    
    If UBound(fullAddress) <> 1 Then
        MsgBox "Invalid format. Please enter in the format: SheetName!Address (e.g., Sheet6!A1). Exiting."
        Exit Sub
    End If
    
    On Error Resume Next
    Set destSheet = ThisWorkbook.Sheets(fullAddress(0))
    On Error GoTo 0
    
    If destSheet Is Nothing Then
        MsgBox "Sheet " & fullAddress(0) & " does not exist. Exiting."
        Exit Sub
    End If
    
    ' Copy the range to the specified destination
    sourceRange.Copy Destination:=destSheet.Range(fullAddress(1))

    MsgBox "Data copied successfully!"
End Sub
Macro dialog box
Macro dialog box

When you’re done setting up the macro, press Alt + F8 to launch the Macro dialog box.

Select the CopyRangeToAnotherSheet macro and hit Run.

Select range dialog
Select range dialog

Use the input box to choose the source dataset from the active worksheet.

Destination dialog
Destination dialog

Now, enter the destination worksheet and anchor cell’s reference in this format:

Sheet6!A1
Confirmation dialog
Confirmation dialog

The VBA macro will complete the data copying process and show a confirmation dialog box.

If you need to copy data to a worksheet in a different Excel file, use this script instead:

VBA script 2
VBA script 2
Sub CopyRangeToAnotherWorkbook()
    Dim srcRange As Range
    Dim destWorkbook As Workbook
    Dim destSheet As Worksheet
    Dim destAddress As String
    Dim filePath As String
    Dim sheetName As String
    Dim cellAddress As String
    Dim splitAddress() As String

    ' Step 1: Get the range to copy
    On Error Resume Next
    Set srcRange = Application.InputBox("Select the range to copy", Type:=8)
    On Error GoTo 0

    If srcRange Is Nothing Then
        MsgBox "No range selected. Exiting."
        Exit Sub
    End If

    ' Step 2: Open file explorer to choose the destination workbook
    filePath = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls; *.xlsx; *.xlsm), *.xls; *.xlsx; *.xlsm", Title:="Select the destination workbook")
    
    If filePath = "False" Then
        MsgBox "No file selected. Exiting."
        Exit Sub
    End If

    ' Open the destination workbook
    Set destWorkbook = Workbooks.Open(filePath)

    ' Step 3: Get the destination sheet name and cell address
    destAddress = InputBox("Enter the destination in the format SheetName!CellAddress (e.g., Sheet6!A1):", "Destination Address")

    If destAddress = "" Then
        MsgBox "No destination address entered. Exiting."
        Exit Sub
    End If

    ' Split the address into sheet name and cell address
    splitAddress = Split(destAddress, "!")
    If UBound(splitAddress) <> 1 Then
        MsgBox "Invalid format. Please enter in the format SheetName!CellAddress (e.g., Sheet6!A1). Exiting."
        Exit Sub
    End If

    sheetName = splitAddress(0)
    cellAddress = splitAddress(1)

    ' Check if the sheet exists in the destination workbook
    On Error Resume Next
    Set destSheet = destWorkbook.Sheets(sheetName)
    On Error GoTo 0

    If destSheet Is Nothing Then
        MsgBox "The specified sheet does not exist in the destination workbook. Exiting."
        destWorkbook.Close SaveChanges:=False
        Exit Sub
    End If

    ' Step 4: Copy the range to the destination
    srcRange.Copy Destination:=destSheet.Range(cellAddress)

    ' Optional: Clean up
    destWorkbook.Save
    MsgBox "Data copied successfully!"

    ' Close the destination workbook
    destWorkbook.Close SaveChanges:=True
End Sub
Workbook browser
Workbook browser

When you execute this script, Excel VBA will show a file browsing dialog box so you can choose the destination workbook on your PC and launch the file.

Destination dialog for new workbook
Destination dialog for new workbook

Once the file is open, use the worksheet reference dialog box to enter the destination sheet name and cell address in the following format:

Sheet6!A1
Confirmation dialog for new workbook
Confirmation dialog for new workbook

The VBA macro will show a confirmation if the process is successful.

Copy Data Using Power Automate

Suppose, you get fresh data in the form of Excel workbooks from a business app, let’s say a sales CRM. The workbook contains updated data for each day. You’d like to collate regular sales data in a monthly sales workbook.

Instead of manually accessing each day’s data and copying that to the monthly sales file each day, you can set up a Power Automate flow that’ll utilize Office Scripts. The automation flow will access the fresh data workbook, copy its content, and paste it into the last row of the main workbook where you’re collating sales data.

📝 Note: You’ll need a paid subscription to Microsoft 365, preferably Business Standard or better to access all the tools and functionalities used in this method.

Create a Directory on OneDrive Business

Create directory
Create directory

Open OneDrive for Business portal and create a directory named Daily Sales.

You can get a URL for this folder and feed that into your sales CRM. The software will create and save daily sales reports in this directory automatically.

Create Required XLSX Files

You’ll also need to create an Excel workbook in OneDrive for Business where you’ll save Office Scripts and let Power Automate aggregate daily sales data automatically.

Monthly sales directory
Monthly sales directory

For this, you can create a Monthly Sales directory in OneDrive. Inside this folder, create the Monthly Sales XLSX file.

Monthly Sales worksheet
Monthly Sales worksheet

The central Excel file, Monthly Sales, should have the same columns as the sales CRM tool generates in the Daily Sales XLSX file.

For this tutorial, I’ve created one as shown above.

Make sure to rename the worksheet to Data.

Daily Sales workbook
Daily Sales workbook

This is the same data structure that I’ve got in the Daily Sales Excel workbook.

Don’t keep the Daily Sales file inside the Daily Sales directory yet. This file will be used as a trigger for the automation.

Create and Save Office Scripts Codes

Automate tab
Automate tab

Open the Monthly Sales workbook and navigate to the Automate tab.

Click on the New Script command to bring up the Code Editor panel.

Fetch Data from Excel
Fetch Data from Excel

Inside the coding interface, enter the following Office Scripts code and save it as Fetch Data from Excel.

function main(workbook: ExcelScript.Workbook, 
  wsName: string, startCell: string, 
  headerRowsToRemove: number, 
  footerRowsToRemove: number) {

  //Declare and assign the worksheet
  let ws = workbook.getWorksheet(wsName);

  //Delare and assign the data range
  let wsRng = ws.getRange(startCell).
    getSurroundingRegion()

  //Get the values of the data range in array
  let wsRngArr = wsRng.getValues();

  //Count the rows in array
  let wsRngArrRowCount = wsRngArr.length;

  //Calcualte the number of rows to return
  let wsRngArrRowLength = wsRngArrRowCount - 
    headerRowsToRemove - footerRowsToRemove + 1;

  //Remove the top and bottom rows
  wsRngArr = wsRngArr.slice(headerRowsToRemove, wsRngArrRowLength)

  //Return the range
  return { wsRngArr };

}

Now, repeat the same steps and create another Office Scripts code as Paste Data to Excel from PA:

Paste Data to Excel from PA
Paste Data to Excel from PA
function main(workbook: ExcelScript.Workbook, wsName: string,
    startCell: string, strArr: string) {

    //Convert the strArr to an array
    let newDataArr: string[][] = JSON.parse(strArr)

    //Declare and assign the worksheet
    let ws = workbook.getWorksheet(wsName);

    //Get the old data
    let dataArr = ws.getRange(startCell).getSurroundingRegion().
        getValues()

    //Join the dataArr and newDataArr
    dataArr = dataArr.concat(newDataArr)

    //Get the size of the range to paste to
    let dataRng = ws.getRange(startCell).
        getAbsoluteResizedRange(dataArr.length, dataArr[0].length)

    //Set the values of the new data set
    dataRng.setValues(dataArr)

}

Set Up the Power Automate Flow

Automated cloud flow
Automated cloud flow

Open Power Automate, navigate to the Create menu and click on the Automated cloud flow.

Build an automated cloud flow
Build an automated cloud flow

The Build an automated cloud flow dialog will open. There, enter a name in the Flow name field.

In the Search a trigger field, enter File created and choose When a file is created Onedrive for Business trigger.

Click Create to enter the flow editing canvas.

Daily Sales as the default folder
Daily Sales as the default folder

In the flow-editing canvas, click on the trigger and set Daily Sales as the default folder using the Parameters field.

Add an action
Add an action

Click the plus icon and select Add an action.

Excel Online (Business) Run script
Excel Online (Business) Run script

On the left side navigation panel, look up Run script and select Excel Online (Business) Run script action.

Parameters for Run script one
Parameters for Run script one

Set up the Parameters for this action as shown in the screenshot above.

Run script two
Run script two

Follow the previous steps again to add the second Run script action and populate values in the Parameters field as illustrated in the image.

Click Save
Click Save

Hit the Save button on the top right corner.

Executing the Automation

Move Daily Sales
Move Daily Sales

To run the flow, drag and drop the Daily Sales XLSX file into the Daily Sales directory of OneDrive for Business.

Power Automate flow
Power Automate flow

The Power Automate flow will run and show a status message as you can see in the screenshot above.

New content added
New content added

You’ll also see new data in the Monthly Sales Excel workbook.

Conclusions

Now you know how to copy data from one Excel sheet to another using various user interface commands, formulas, and programmatic methods.

If you liked the Excel tutorial, you can acknowledge it by commenting below. Also, share any suggestions you might have after trying these techniques.

About the Author

Bipasha Nath

Bipasha Nath

Bipasha is a technical content writer with 10+ years of experience in the technology industry. She previously worked in a SaaS software development company focused on SharePoint, OneDrive, Word, Excel, Word solutions.

Related Posts

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃