One-click implementation of Word table auto-filling

  
always uses Word to do the report, although the statistics of some simple data tables involved in the table are also well solved by the formula in the table menu, but in the Word table, the formula can not be filled like text. You can fill multiple lines at once with a number. If you can do something once and for all —— in Word, you can easily implement the filling function of the table formula, which saves the trouble of transferring the table to Excel and then back to Word. Requirement: Calculate the total sales and monthly sales of each salesperson in the Word table. Xiaobian recommended "Office2015 download" analysis: the filling of formulas in Word tables is a difficult problem, it is very difficult to achieve using ordinary methods. However, we can use VBA code to do the above tasks well. Don't think that you have to write VBA code every time, it's too much trouble, it's better to use Excel to complete it! In fact, we can make this code into a button in Word, you only need to click it when you need it, saving you from switching back and forth between Word and Excel. It can be described as a troublesome thing, and it will be used for life! In Word 2013, click the “Visual Basic” button in the Development Tools tab to enter the VBA editing window. In the left project window, double-click “Normal→ Module" under “NewMacros” The area enters the code in the diagram. The specific code can be downloaded at “pan.baidu.com/s/1gdpBuL1””. (Figure 1) Close this VBA editing window, and then, assign this VBA code to a button. First, select the "File → Options" menu, select the "Customize Ribbon" menu in the "Word Options" window, select ">; Macro" from the following location. Select “Tools tab" in the “Customize Ribbon" and expand further to "Table Tools & Rarr; Layout" "Layout" "Layout" "Click “New Group" button, right Rename the newly created group to “Form Formula Fill & rdquo;. Then, drag “Normal.NewMacros. table formula fill & rdquo; drag below the new group, right click and rename it to “ table formula fill & rdquo;, finally click the & ldquo; OK & rdquo; button to complete the button add . You can use this button as a tool button later and use it at any time. (Figure 2) After the button is added, you can fill in the formula for the table. First, use the formula to find the total sales of the first record (ie, place the cursor on the total of the first record, and select the “fx formula” in the “Layout” section of the “Layout” tab. In the window that appears, the default formula is “=SUB(LEFT)”, click directly to <;OK” Then, select this formula and the cells you want to fill, click on the newly added “Form Formula Fill ” The button will automatically fill the continuously selected cells with the selected formula as a blueprint. (Figure 3) How about, I didn't think that the Word table can also automatically fill the formula sequence like the Excel worksheet? This article comes from [System Home] www.xp85.com
Copyright © Windows knowledge All Rights Reserved