-
For example, if you want c1=a1+b2, if you want c1:c100 to be relatable.
sub calculates ().
for i = 1 to 100
range("c" & i) = range("a" & i) +range("b" & i)
if range("c" & i) = 0 thenrange("c" & i) = ""
end if
nextend sub
Find you do it this way, because I don't know what you want is the lookup function, if the area is large, use the cell coordinate method to hurry up, that is: sheets(1).cells(i,1)
Rows 1 to 100 for the first worksheet of the first worksheet in the first column have been defined in front of i=1 to 100
-
Just record your operation process into a macro and you'll find out.
-
The role of a macro is very powerful, it is a program that can complete a rather complex series of logical judgments and operations.
Macros can be used in any situation, and the more complex the problem, the more effective they are to deal with them.
Simple use of macros, you can use recording macros, and then reuse advanced ones, you can directly open the **window**, write**.
You can go here and learn.
-
1. Open the electron ** where you want to modify the macro.
3. At this time, the dialog box of "Macro" will pop up, and select the name of the macro you want to modify in the macro name.
4. After the user selects the macro to be modified, click the "" button on the right.
5. After modifying, click the "Save" button in the toolbar to save.
-
The essence of a button is a macro, so before making a button, let's record a macro first, and when the macro is ready, we can make the button. First open a ** as shown in the figure, select the heading, and then we execute on the menu bar: Development Tools Macros.
2. Set the macro name to [Big Heading] and save the location to [Personal Macro Workbook], so that you can see this macro when you open any Excel, and if you save it in [Current Workbook], you can only see the macro in this Excel file.
3. Right-click the selected cell, and in the right-click menu that opens, select Format Cell
4In the opening Format Cells dialog box, switch under Alignment Options, and set Align Horizontally, Align Vertically, Merge Cells.
5 Switch to Font Options, then set the font shape and size, and finally click the OK button. The glyph and font size should be set in accordance with the requirements of the heading's eye-catching.
6. After setting the format of the heading, we click [Stop Recording] under the development tools
Next, record a macro again, this time to set the format of the subheading, set up the smooth diagram I have already pasted below, because the steps are the same as above, I will not explain it here.
After recording the macro, we execute it on the menu bar: Developer Tools Insert, and select the button in the list that opens.
Drag the mouse to draw a button, and a dialog box will open to specify the macro, select the macro [Title], and then click the OK button.
Set the text on the button to: Format the heading. If you have higher requirements for the text on the button, you can also right-click the button and select Format Space to make more specific settings for the text.
In the same way, we add a button 2 and specify the macro as a subheading.
Finally, let's insert buttons in a different way, the buttons mentioned above are to create a macro first, and then add a button, now insert a button, and then create a macro, as shown in the figure, first select a cell to be formatted, and then execute the development tools on the menu bar Insert, insert a button.
Drag the mouse to draw a button, and then the dialog box will automatically open, set the macro name to [Set Column Header], and then click [Record] on the right
Open the Record Macro dialog box, set the macro name, and then click OK. Let's start formatting the cells, and all the settings will be recorded in the macro.
After the cell setting is complete, run the following command: Development Tools to stop recording.
Set the text of the button to: Format the column headers, and you're done making the button, have you learned it?
-
Macro buttons can be set in Excel, and the specific operations are as follows:
1. Use tools: excel2007
2. Steps:
-
Answer: Specifying a macro is to specify a macro for the graphics button, right-click to select the graphics or buttons, there is a specified macro command on the right-click, click this command will pop up the specified macro dialog box.
-
In version 03, the corresponding options for recording and executing macros are all under Tools - Macros.
If you want to make a button, you need to record a macro first, that is, record the corresponding operation, so that when you encounter the same operation in the future, you can use the macro to automatically perform the corresponding action.
The specific steps of recording are to choose: Tools - Macros - Record Macro Then set the name and save location of the macro in the pop-up dialog box, there are 3 save locations, namely, the current workbook (you can only use the recorded macro when the current workbook is opened), the personal workbook (use the recorded macro in any workbook), and the new workbook (put the macro into a new workbook).
Once you have set the name and save location of the macro, you can start recording the macro and perform the operations that need to be recorded by the macro. Record a good selection: Tools - Macro - Stop Recording to end the recording.
After recording, the next time you encounter the same operation, you can execute the macro to automatically complete the corresponding operation: Tools - Macros - Run Macros.
-
When recording a macro, a dialog box will pop up, choose to save in"Personal macro workbook" .Select when exiting the excel sheet"Yes", apply to other worksheets, about macros when prompting to unhide the window please figure above.
To put it bluntly, it's the format of making a pay slip! ** Below: >>>More
First of all, I've been asking questions about excel inventory ** for a long time. What impressed me the most is that most of my friends want to display invoicing and other information in a single sheet page at the same time. >>>More
excel2007 freeze window - horizontal freeze a line method: >>>More
Summary. Hello.
1. First of all, open the web page to enter data in the software, and manually enter the filled items in the web form. >>>More
To give you a sample file, each corresponding function is a separate one. >>>More