VBA & Macro Problems

Copy a Fixed Excel Range to the Active Worksheet with VBA

Steven ParkerSteven Parker Nov 14, 2026 868 views

Question details

The user needs a VBA macro that copies cells A5:C39 from the NETS worksheet to the next available row on the active worksheet.

Copy a Fixed Excel Range to the Active Worksheet with VBA
Product
Microsoft Excel
Device & OS
not provided
Scenario
Append a fixed source range to whichever destination worksheet is active, using column A to determine the next row.
Observed behavior
The copied range should begin below the last used cell in column A of the active worksheet.
Before you start

Confirm that the workbook containing the macro has a worksheet named NETS and that the destination worksheet has enough room for 35 rows. Save the workbook in a macro-enabled format such as .xlsm and allow macros if prompted.

Solution 1Recommended

Copy the NETS range to the active sheet with a VBA macro

Use this macro to append NETS!A5:C39 below the last used cell in column A, or start at row 1 if column A is empty.

The macro uses ThisWorkbook as the source workbook and the active worksheet as the destination. It determines the destination row from column A, so it does not check whether columns B or C contain data farther down.

1
Open the VBA editor

In Excel, open the workbook and select Developer > Visual Basic. In the VBA editor, select Insert > Module.

2
Add the macro

Paste this code into the module: Sub CopyFromNETS() Dim destination As Worksheet Dim nextRow As Long Set destination = ActiveSheet With destination If Application.WorksheetFunction.CountA(.Columns("A")) = 0 Then nextRow = 1 Else nextRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1 End If ThisWorkbook.Worksheets("NETS").Range("A5:C39").Copy _ Destination:=.Cells(nextRow, "A") End With End Sub

3
Run it on the destination sheet

Return to Excel and select the destination worksheet. Choose Developer > Macros, select CopyFromNETS, and click Run.

Copy the NETS range to the active sheet with a VBA macro
Check the destination: Do not run the macro with NETS active if the destination could overlap the source range. The Copy method also copies formatting, and relative formula references may change.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files to continue working with your data, but check VBA support in your WPS edition before relying on an Excel macro; WPS does not repair Excel's VBA environment.

Open and edit Microsoft Excel XLSX and XLS filesWork with worksheet ranges in a familiar spreadsheet interfaceMove compatible spreadsheets to WPS Office without rebuilding themUse a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

How does the macro find the next available row?

It checks column A of the active worksheet. If the column is empty, it starts at row 1; otherwise, it starts one row below the last used cell found with End(xlUp).

What if columns B or C contain data below the last entry in column A?

The macro does not check those columns when choosing the destination. Review columns A:C on the destination sheet before selecting Developer > Macros and running CopyFromNETS, or change the row-finding logic to include all three columns.

Where should I save the macro?

In the workbook that contains the NETS worksheet, select Developer > Visual Basic and use Insert > Module. Save the workbook as an Excel Macro-Enabled Workbook (.xlsm).

Does the macro copy formatting and formulas?

Yes. The Range.Copy method copies cells with their formatting and formulas. Relative references in copied formulas may adjust to their new positions.