Excel VBA: Cell Reference in Another Sheet – 4 Methods

This is the sample data set.Sample Data


Method 1- Reference Cells in Another Sheet with Excel VBA

Copy the data in D5 in ‘Sheet2’ to ‘Sheet1’

Effective Ways to Perform Cell Reference in Another Sheet with Excel VBA

Step 1:

  • Press  Alt + F11  to open VBA.
  • Click Insert.
  • Choose Module.

Effective Ways to Perform Cell Reference in Another Sheet with Excel VBA

Step 2:

  • Enter the following VBA.
Sub Select_a_Cell()
    Worksheets("sheet1").Range("D5").Copy
End Sub

Effective Ways to Perform Cell Reference in Another Sheet with Excel VBA

Step 3:

  • Save and press  F5  to run the code.
  •  D5  is copied in ‘Sheet1’.

Effective Ways to Perform Cell Reference in Another Sheet with Excel VBA

Read More: How to Display Text from Another Cell in Excel


Method 2 – Reference Cells for Multiple Ranges in another Sheet with Excel VBA

Step 1:

  • Select Module and enter the following VBA.
Sub Copy_Ranges()
    Worksheets("sheet3").Range("B4:F11").Copy
End Sub

Effective Ways to Perform Cell Reference in Another Sheet with Excel VBA

Step 2:

  • Save and press  F5  to run the code.
  • B4:F11 is copied.

Effective Ways to Perform Cell Reference in Another Sheet with Excel VBA

Step 3:

  • Enter the following code.
Sub Copy_Multiple_Ranges()
    Worksheets("sheet3").Range("B4:F11,B13:F16").Copy
End Sub

Effective Ways to Perform Cell Reference in Another Sheet with Excel VBA

  • B4:F11 and B13:F16 are selected and copied.

Effective Ways to Perform Cell Reference in Another Sheet with Excel VBA

Read More: How to Reference Text in Another Cell in Excel 


Method 3 – Reference Cells  in Another Sheet with Excel VBA

Copy B2:F11 from ‘Sheet4’ and paste it in ‘Sheet5’.

Effective Ways to Perform Cell Reference in Another Sheet with Excel VBA

Step 1:

  • Select Module and enter the following VBA:
Sub Paste_Multiple_Ranges()
    Sheets("Sheet4").Range("B2:F11").Copy
Sheets("Sheet5").Range("B2:F11").PasteSpecial
End Sub

Effective Ways to Perform Cell Reference in Another Sheet with Excel VBA

Step 2:

  • Save and press  F5  to run the code.

The range in ‘Sheet4’ will be pasted in ‘Sheet5’.

Sample Data

Read More: How to Use Variable Row Number as Cell Reference in Excel


Method 4 –  Reference Cells in Another Workbook with Excel VBA

Copy the data in the ‘Fill Blank Cells’ workbook and the ‘VBA’worksheet. Paste it in ‘Sheet7’ of ‘Cell Reference’, the current workbook.

Sample Data

Step 1:

  • Select Module and enter the following VBA.
Sub Copy_from_Another_Workbook_1()
    Workbooks("Fill Blank Cells.xlsm").Worksheets("VBA").Range("B4:F14").Copy
    Sheets("Sheet7").Range("B4:F14").PasteSpecial
End Sub

Sample Data

Step 2:

  • Save and press  F5  to run the code.
  • Cells will be pasted in the other workbook.

Sample Data

Cells will also be displayed in ‘Sheet7’ of the current workbook.

Sample Data

Read More: How to Reference Cell by Row and Column Number in Excel


Download Practice Workbook

Practice here.


Related Articles


<< Go Back to Reference to Another Sheet | Cell Reference in Excel | Excel Formulas | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Bhubon Costa
Bhubon Costa

Bhubon Costa, B.Sc. in Naval Architecture & Marine Engineering from Bangladesh University of Engineering & Technology, has worked with the ExcelDemy since 2021. Currently, he has been working as a reviewer. Notably, he has written over 90 articles and led several VBA content development teams. He has a great passion for the fields of data analytics and data science. His areas of expertise include Excel VBA, Power Query, Pivot Table, Power BI, MySQL, PostgreSQL, machine learning, and Python... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo