VBA & Macro Problems

Copy Excel Data Entry Values to Another Worksheet with VBA

Nimra MalikNimra Malik Nov 13, 2026 869 views

Question details

The user needs a VBA macro in WPS Spreadsheets that copies calculated data entry values from an entry form to the next empty row on another worksheet, then clears only manual input cells while preserving formulas.

Copy Excel Data Entry Values to Another Worksheet with VBA
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
Building a data entry workflow that transfers results from a form to a storage worksheet.
Observed behavior
No working macro is currently available; recorded macros were deleted, and the user needs a reliable generic VBA example.
Before you start

Open the workbook in WPS Spreadsheets, save it as a macro-enabled workbook (.xlsm), and identify the entry worksheet, storage worksheet, input cell addresses, destination columns, and the column used to find the next empty row.

Solution 1Recommended

Create a VBA Macro That Copies Entry Values to the Next Empty Row and Clears Only Input Cells

Use this method when you want WPS Spreadsheets to transfer data from an entry form to a storage worksheet and preserve formulas between entries.

The macro works by mapping each entry cell to a destination column, assigning the source cell's Value to the destination row, finding the next empty row, and clearing only the cells intended for manual input.

1
Open the VBA editor

Open the workbook in WPS Spreadsheets and press Alt+F11 to open the Microsoft Visual Basic for Applications editor.

2
Insert a module

In the Project Explorer pane, right-click the VBAProject for the current workbook, choose Insert > Module, and open the new module window.

3
Define the entry and storage worksheets

At the top of the module, set the source and destination worksheets, for example: Set entry = ThisWorkbook.Worksheets("Entry") and Set storage = ThisWorkbook.Worksheets("Storage").

4
Copy values to the next empty row

Find the next empty row with nextRow = storage.Cells(storage.Rows.Count, 1).End(xlUp).Row + 1, then assign each source cell's .Value to the matching destination column, such as storage.Cells(nextRow, 1).Value = entry.Range("C5").Value.

5
Clear only manual input cells

After the transfer, clear only the input cells with entry.Range("C5,C7,D10").ClearContents. Do not clear cells that contain formulas required for the next entry.

Create a VBA Macro That Copies Entry Values to the Next Empty Row and Clears Only Input Cells
Formulas remain intact: The macro copies the calculated results as values and clears only the specified input cells, so formula cells are not removed.
WPS Spreadsheets VBA

Copy Data Entry Values to Another Worksheet with WPS Spreadsheets VBA

Use WPS Spreadsheets to automate the transfer from an entry form to a storage worksheet. The macro copies calculated values, finds the next empty row, clears only manual input cells, and keeps formulas intact.

  1. 1. Open the workbook: Open the target workbook in WPS Spreadsheets and enable macros when prompted.
  2. 2. Open the VBA editor: Press Alt+F11 to open the Microsoft Visual Basic for Applications editor.
  3. 3. Add the transfer macro: In Project Explorer, right-click the current VBAProject, choose Insert > Module, and create a macro that maps each entry cell to its destination column using .Value assignment.
  4. 4. Find the next empty row: Inside the Storage worksheet, use storage.Cells(storage.Rows.Count, 1).End(xlUp).Row + 1 to set the destination row.
  5. 5. Clear only input cells and run: After copying, clear only the manual input ranges with .ClearContents, then run the macro with F5 or assign it to a button.
Copies calculated results as values instead of linking to the source formulasClears only manual input cells so formulas remain available for the next entrySupports .xlsx and .xlsm workbooks with Excel-compatible VBA syntaxProvides a free, lightweight Office alternative in WPS SpreadsheetsKeeps the familiar Visual Basic editor and macro workflow
microsoft office alternative - wps office

Frequently Asked Questions

Can the VBA macro copy calculated results instead of formulas?

Yes. Assign the source cell's .Value property to the destination cell instead of .Formula or .FormulaR1C1, and the displayed calculated result is copied.

How do I clear input cells without deleting formulas?

Clear only the specific manual input ranges, for example with Range("C5,C7,D10").ClearContents, and exclude any cells that contain formulas.

How does the macro find the next empty row in the storage worksheet?

Use a column that is always filled after each transfer, then calculate nextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1 in the storage worksheet.

Will this macro work in WPS Spreadsheets?

Yes, WPS Spreadsheets supports VBA macros. Open the editor with Alt+F11 and save the workbook as a macro-enabled .xlsm file if required.

What should I do if the macro does not run?

Enable macros in Security or Trust Center settings and check that the worksheet names and cell references in the code match your workbook.