How to use macro recording in Excel to automatically arrange input content into another sheet

王林
Release: 2024-03-29 15:06:15
forward
861 people have browsed it

1. Make the header of the visitor registration form.

How to use macro recording in Excel to automatically arrange input content into another sheet

2. Make a visitor registration form.

How to use macro recording in Excel to automatically arrange input content into another sheet

3. Design data validity as needed, such as inputting specific text, fixed-length values, etc.

How to use macro recording in Excel to automatically arrange input content into another sheet

4. Formula-name manager can manage the name of the editing table. Convenient for cross-table referencing. The name of the edit table here is [Visitor Registration Information Summary].

How to use macro recording in Excel to automatically arrange input content into another sheet

5. Enter the formula =COUNT (visitor registration information summary table [number]) 1 to realize automatic numbering.

How to use macro recording in Excel to automatically arrange input content into another sheet

6. Enter the IF function to determine whether the filling is complete. =IF(AND(C5"",E5"",C6"",C7"",E7"",C8"",C9 indicates that the cell has data, "" indicates that the cell is blank.

How to use macro recording in Excel to automatically arrange input content into another sheet

7. Development tools-record macro and change the name.

How to use macro recording in Excel to automatically arrange input content into another sheet

8. Insert a row here in the general table, return to the registration table to copy the data, be sure to select copy and paste in the start (select paste as a value), do not use shortcut keys ! Stop recording after typing.

How to use macro recording in Excel to automatically arrange input content into another sheet

9. After completion, insert the form control button and link the macro.

How to use macro recording in Excel to automatically arrange input content into another sheet

10. Next, use the IF function to edit the macro and determine whether the form is complete before performing automatic entry. Development tool-Visual Basic, open the macro code editing window.

How to use macro recording in Excel to automatically arrange input content into another sheet

11. At the beginning, enter the following statement: If Range("B10").Text = "Information completed" Then

How to use macro recording in Excel to automatically arrange input content into another sheet

12 , at the end, enter:

Else

MsgBox "Incomplete data cannot be entered into the master table"

End If

How to use macro recording in Excel to automatically arrange input content into another sheet

13. If the information is incomplete, a pop-up window will appear after clicking the automatic entry button.

How to use macro recording in Excel to automatically arrange input content into another sheet

The above is the detailed content of How to use macro recording in Excel to automatically arrange input content into another sheet. For more information, please follow other related articles on the PHP Chinese website!

source:zol.com.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template