Excel can customize the functions to address personal problems in a targeted way.
By default, Excel 2016 does not display the development tools option, you need to go to the file → options → custom ribbon, and then on the right, select Development tools and click OK to return.
Next switch to the Developer tab, click the Visual Basic button on the left side of the toolbar to open the VBA Development window, click the Insert → module menu in the window, and then customize the function in the Open Module window. Here, enter a simple piece of code in the module window:
Function product (A As Integer, B as Integer)
Product = (A * b)
End Function
"Function" means that this is a function, the "product" is the name of the function, with two arguments declared in parentheses, integers a and b respectively. The middle line of code is the multiplication of the two integers. The last line of "End Function" indicates that the function ended.
Now go back to the Excel table and try the custom function. Enter the formula "= Product (A1,B1)" In the cell of the A1 cell to enter the 20,a3 cell 10,A2 the correct product number.
Of course, this is just a simple example of a function where you can enter more complex code to accomplish more detailed tasks.