Description:

Copying Data from One Range to Another range is most commonly performed task in Excel VBA programming. We can copy the data, Formats, Formulas or only data from particular range in Excel Workbook to another range or Sheet or Workbook.

This example to show you how to copy data from one Range to another using Excel VBA. This is one of the frequently used codes in the VBA, we often do this activity, copying the data from one range to another range in a worksheet.r

Copy Data from One Range to Another in Excel VBA- Solution(s):

Copy Data from One Range to Another in Excel VBAYou can use Copy method of a range to copy the data from one range to another range.

Copy Data from One Range to Another in Excel VBA – An Example

The following example will show you copying the data from one range to another range in a worksheet using Excel VBA.

Code:
'In this example I am Copying the Data from Range ("A1:B10") to Range(E1")
Sub sbCopyRange()

'Method 1
Range("A1:B10").Copy Destination:=Range("E1")
'Here the first part is source range, 
'and the second part is target range or destination.
'Target can be either one cell or same size of the source range.

'Method 2
Range("A1:B10").Copy
Range("E1").Select
ActiveSheet.Paste

'In the second method, first we copy the source data range
'Then we select the destination range
'Target can be either one cell or same size of the source range.
'Then we paste in the active sheet, so that it will paste from active range

Application.CutCopyMode = False

End Sub
Instructions:
  1. Open an excel workbook
  2. Enter some data in Sheet1 at A1:B10
  3. Press Alt+F11 to open VBA Editor
  4. Insert a Module for Insert Menu
  5. Copy the above code and Paste in the code window
  6. Save the file as macro enabled workbook
  7. Press F5 to run it

Now you should see the required data (from Range A1 to B10 ) is copied to the target range (Range E1 to F10).

Premium Project Management Templates

120+ Professional Project Management Templates!

A Powerful & Multi-purpose Templates for project management. Now seamlessly manage your projects, tasks, meetings, presentations, teams, customers, stakeholders and time. This page describes all the amazing new features and options that come with our premium templates.

PREMIUM TEMPLATES
LIMITED TIME OFFER
ON SALE80% OFF
BROWSE ALL TEMPLATES

Advanced Project Planning Templates

Excel Templates

VIEW DETAILS

120+ Project Management Templates Pack

Excel | PowerPoint | Word

VIEW DETAILS

ULTIMATE RESOURCE MANAGEMENT TEMPLATE

Excel Template

VIEW DETAILS

50+ Essential Project Management Templates

Excel | PowerPoint | Word

VIEW DETAILS

Project Portfolio Management Templates

Excel | PowerPoint Templates

VIEW DETAILS

50+ Excel Project Management Templates

Excel Templates

VIEW DETAILS

By Published On: June 14th, 2013Categories: Excel VBATags:

Share This Story, Choose Your Platform!

About the Author: Valli

Excel VBA Developer having around 8 years of experience in using Excel and VBA for automating the daily tasks, reports generation and dashboards preparation. Valli is sharing to helps us automating daily tasks.