Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to import data from another worksheet?

When you operate an Excel file, you may want to import some data from another worksheet into your current worksheet. Today, I will talk about some interesting tricks for you to deal with this problem.

Import data from another worksheet with Connections function

Import data from another worksheet with VBA code

Import data from another worksheet with Kutools for Excel

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

arrow blue right bubble Import data from another worksheet with Connections function


If you are familiar with the Connections feature in Excel, you can import another worksheet data into current workbook, and your imported data will be updated with the original data automatically.

1. Go to click Data > Connections, see screenshot:

doc-import-data-to-worksheet-1

2. In the Workbook Connections dialog, click Add button, and in the popped out Existing Connections dialog, click Browse for More button, see screenshots:

doc-import-data-to-worksheet-2
-1
doc-import-data-to-worksheet-3

3. And then choose the workbook that you want to export its data to current worksheet.

doc-import-data-to-worksheet-1

4. After choosing the workbook, please click Open button, and select one worksheet that you want to use. See screenshot:

doc-import-data-to-worksheet-1

5. Then click OK, it will return to the Workbook Connections dialog box, and your selected workbook is added to the list box, please close this dialog.

6. Then go on clicking Data > Existing Connections, see screenshot:

doc-import-data-to-worksheet-1

7. In the Existing Connections dialog box, click the workbook that you are added just now, and click Open button. See screenshot:

doc-import-data-to-worksheet-1

8. And in the popped out Import Data dialog, choose one option you like from the Select how you want to view this data in your workbook, and then choose one the existing worksheet range or a new worksheet to put the data.

doc-import-data-to-worksheet-1

9. Then click OK, the data from another worksheet has been imported into your specified worksheet.

doc-import-data-to-worksheet-1

Notes:

1. Using this method, you can import the data with the type of table, PivotTable Report or PivotChart and PivotTable Report.

2. Your workbook has been connected to that external data, if you want to get the latest data in your own workbook. Go to Data > Refresh All to get the updated data.

doc-import-data-to-worksheet-1


arrow blue right bubble Import data from another worksheet with VBA code

There are so many steps of above method, may be you will feel tired, here, the following VBA code also can help you to import data from another worksheet.

1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Import data from another worksheet

Sub ImportDatafromotherworksheet()
    Dim wkbCrntWorkBook As Workbook
    Dim wkbSourceBook As Workbook
    Dim rngSourceRange As Range
    Dim rngDestination As Range
    Set wkbCrntWorkBook = ActiveWorkbook
    With Application.FileDialog(msoFileDialogOpen)
        .Filters.Clear
        .Filters.Add "Excel 2007-13", "*.xlsx; *.xlsm; *.xlsa"
        .AllowMultiSelect = False
        .Show
        If .SelectedItems.Count > 0 Then
            Workbooks.Open .SelectedItems(1)
            Set wkbSourceBook = ActiveWorkbook
            Set rngSourceRange = Application.InputBox(prompt:="Select source range", Title:="Source Range", Default:="A1", Type:=8)
            wkbCrntWorkBook.Activate
            Set rngDestination = Application.InputBox(prompt:="Select destination cell", Title:="Select Destination", Default:="A1", Type:=8)
            rngSourceRange.Copy rngDestination
            rngDestination.CurrentRegion.EntireColumn.AutoFit
            wkbSourceBook.Close False
        End If
    End With
End Sub

3. Then press F5 key to run this code, and choose the workbook that you want to insert its data into current workbook, see screenshot:

doc-import-data-to-worksheet-1

4. After selecting the workbook, then click Open button, and select a worksheet or a range of your specified workbook which data you need to export. See screenshot:

doc-import-data-to-worksheet-1

5. Then click OK, and select one cell to put your imported data in your current worksheet, see screenshot:

doc-import-data-to-worksheet-1

6. Go on clicking OK, and your selected data has been imported into your worksheet.

Note: With this method, the imported data will not update with the original data.


arrow blue right bubble Import data from another worksheet with Kutools for Excel

Kutools for Excel also provides Insert File at Cursor feature for you to solve this problem.

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Get it Now

1. Open your workbook that you want to insert another worksheet data.

2. Click Enterprise > Import / Export > Insert File at Cursor, see screenshot:

doc-import-data-to-worksheet-1

3. And in the Insert File at Cursor dialog box, select a cell which you want to put the data begin in, and then click Browse button to select one workbook that you want to insert.

doc-import-data-to-worksheet-1

4. Then click OK, and choose one worksheet if your workbook contains multiple worksheets from the Select a Worksheet dialog, see screenshot:

doc-import-data-to-worksheet-1

5. And then click OK, your selected worksheet has been imported into your specific worksheet.

Note: With this method, the imported data will not update with the original data.

To know more about this Insert File at Cursor feature.


Related article:

How to import a text file or worksheet in Excel?


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Vaclav · 3 months ago
    Amazing, thank you
  • To post as a guest, your comment is unpublished.
    Corbin · 9 months ago
    This post is FANTASTIC!!!! This is extremely helpful! Thank you!!!
  • To post as a guest, your comment is unpublished.
    Mohamed · 1 years ago
    How can i use relative paths instead of fixed paths,
    because these files will be uploaded to SVN and paths will be differ
  • To post as a guest, your comment is unpublished.
    Mayan · 1 years ago
    This was incredibly useful. Thank you!
  • To post as a guest, your comment is unpublished.
    RS · 1 years ago
    I am using the VBA Code. How can I unhide and remove all filter before select source range?
    • To post as a guest, your comment is unpublished.
      Venky · 10 months ago
      Sub Clear()
      '
      ' Clean Sheet
      '
      Dim A As Long

      Sheets("Sheet1").Select
      ActiveSheet.Range("Range").Select
      Selection.Clear

      End Sub


      Example
      range mean A2:D35
  • To post as a guest, your comment is unpublished.
    keegan · 2 years ago
    How do I adapt the VBA code so that it will continuously update with another file?
  • To post as a guest, your comment is unpublished.
    Haris · 2 years ago
    I want to learn VBA, can you give me the number of WhatsApp to facilitate communication
    • To post as a guest, your comment is unpublished.
      stephan McK · 2 years ago
      Hit the record button in execl and ALT+f11 look at the code and then change it run it its the way learnt well that was 20year ago
      Even know I still hit the record and change it to fix the problem
  • To post as a guest, your comment is unpublished.
    Touheed khan · 3 years ago
    Hi,

    It is very useful for me and my organisation. I need help in this.
    While connecting the excel files I am not able to open the html links which are there in main file. Please help me out on this.
  • To post as a guest, your comment is unpublished.
    Harlan Sanders · 3 years ago
    How would you adjust the VBA code so that it would paste selections as values?