Current position:wps office download > Help Center > Article page

How to automatically refresh the wps table serial number after deletion

Release time:2025-04-04 02:16:48 Source:wps office download

How to automatically refresh the wps table serial number after deletion

Introduction to Automatically Refreshing WPS Table Serial Numbers

Automatically refreshing the serial numbers in a WPS table after deletion can save a significant amount of time and reduce the likelihood of errors. In this article, we will guide you through the process of setting up an automatic refresh feature in WPS, ensuring that your serial numbers are always up to date.

Understanding the Problem

When you delete a row from a WPS table that contains serial numbers, the remaining rows do not automatically update their serial numbers. This can lead to inconsistencies and confusion, especially if the table is used for tracking or reporting purposes. To address this, we need to create a macro or a script that can automatically adjust the serial numbers after a row is deleted.

Creating a Simple Macro

To create a macro in WPS, follow these steps:

1. Open your WPS document and navigate to the table where you want to enable automatic serial number refresh.

2. Go to the Macros menu and select Record New Macro.\

3. Give your macro a name and assign a shortcut key if desired.

4. In the macro recording window, click Start Recording.\

5. Select the row from which you want to delete the serial number.

6. Go to the Data menu and choose Delete.\

7. Click Stop Recording to finish the macro.

Modifying the Macro for Automatic Refresh

The default macro will only delete the selected row. To make it automatically refresh the serial numbers, follow these steps:

1. Open the Macros menu and select Edit.\

2. In the Macros window, find the macro you just created and double-click on it.

3. In the VBA editor, you will see the code that was recorded. Add the following lines of code after the Delete command:

```vba

Dim i As Integer

For i = 1 To [Sheet1].UsedRange.Rows.Count

[Sheet1].Cells(i, 1).Value = i

Next i

```

4. Save the changes and close the VBA editor.

Assigning the Macro to a Button

To make it easier to use the macro, you can assign it to a button on your WPS table:

1. Insert a button on your table by going to the Insert menu and selecting Button.\

2. Click and drag to create a button of the desired size.

3. Right-click the button and select Assign Macro.\

4. Choose the macro you created from the list and click OK.\

Testing the Automatic Refresh Feature

To test the automatic refresh feature, follow these steps:

1. Click the button you assigned the macro to.

2. Select a row from your table and click the Delete button.

3. Observe that the serial numbers in the remaining rows automatically refresh to maintain the sequence.

Conclusion

By following the steps outlined in this article, you can set up an automatic refresh feature for the serial numbers in your WPS table. This will help ensure that your data remains accurate and consistent, even after rows are deleted. Remember to save your macro and assign it to a convenient button for easy access in the future.

Related recommendation
How to automatically sum the vertical spaces in WPS column o

How to automatically sum the vertical spaces in WPS column o

UnlockingtheSecretofMobileProductivity:SummingVerticalSpacesinWPSColumnsInthefast-paceddigitalera,mo...
Release time:2025-04-05 03:46:20
View details
How to automatically sum the tables in wps ppt

How to automatically sum the tables in wps ppt

ThisarticleprovidesacomprehensiveguideonhowtoautomaticallysumtablesinWPSPowerPoint(PPT).Itcoversvari...
Release time:2025-04-05 02:31:30
View details
How to automatically sum the formula for WPS on mobile versi

How to automatically sum the formula for WPS on mobile versi

IntroductiontoWPSMobileFormulaSummationWPSOfficeisapopularproductivitysuitethatoffersawiderangeoffea...
Release time:2025-04-05 00:31:08
View details
How to automatically sum the entire process of wps office ta

How to automatically sum the entire process of wps office ta

UnlockingthePowerofAutomation:SummingUpWPSOfficeTablesInthedigitalage,theartofautomationhasbecomeaco...
Release time:2025-04-05 00:10:33
View details
How to automatically sum text in the middle of a mobile phon

How to automatically sum text in the middle of a mobile phon

UnlockingthePowerofTextSummarizationontheGoInthefast-paceddigitalera,oursmartphoneshavebecomeextensi...
Release time:2025-04-04 23:26:48
View details
How to automatically sum tables in wps

How to automatically sum tables in wps

HowtoAutomaticallySumTablesinWPS:AComprehensiveGuideIntoday'sfast-pacedworld,efficiencyandproductivi...
Release time:2025-04-04 23:11:27
View details
How to automatically sum mobile wps form

How to automatically sum mobile wps form

HowtoAutomaticallySumMobileWPSFormIntoday'sfast-pacedbusinessenvironment,efficiencyandaccuracyarecru...
Release time:2025-04-04 21:15:36
View details
How to automatically sum in word of wps

How to automatically sum in word of wps

ThisarticleprovidesacomprehensiveguideonhowtoautomaticallysumuptextinWPS,apopularwordprocessor.Itdel...
Release time:2025-04-04 20:26:51
View details
How to automatically sum Huawei ink screen WPS

How to automatically sum Huawei ink screen WPS

HowtoAutomaticallySumHuaweiInkScreenWPS:StreamlineYourWorkflowInthefast-paceddigitalworld,efficiency...
Release time:2025-04-04 20:01:40
View details
How to automatically sum horizontal and vertical columns of

How to automatically sum horizontal and vertical columns of

IntroductiontoWPSTableandColumnSummationWPSTableisaversatilespreadsheetapplicationthatispartoftheWPS...
Release time:2025-04-04 19:31:51
View details
Return to the top