The Application foundation of WPS table function

Source: Internet
Author: User
Tags arithmetic operators arrays constant error code range

(i) Functions and formulas

1. What is a function

The WPS table function is a special formula that defines, performs calculation, analysis, and so on to process data tasks. Take the commonly used SUM function sum as an example, its syntax is "SUM (value 1, value 2,......)". where "SUM" is called a function name, a function has only one name, which determines the function and purpose of the function. The function name is followed by an opening parenthesis, followed by a comma-separated content called a parameter, and a closing parenthesis is used to indicate the end of the function. The parameter is the most complex part of the function, which stipulates the Operation object, order or structure of the function. Allows the user to deal with a cell or region, such as to determine the score ranking, the calculation of trigonometric values.

2. What is a formula

Functions and formulas are both different and interrelated. If the former is a special formula of the WPS table, the latter is the formula that the user designs the calculation and processing of the worksheet. Take the formula "=sum (E1:H1) *a1+26" as an example, it starts with the equal sign "=", and its interior can include functions, references, operators, and constants. "SUM (E1:H1)" In the formula is a function, "A1 is a reference to cell A1 (using the data stored in it)," 26 "is a constant, and" * "and" + "are arithmetic operators (in addition to comparison operators, text operators, and reference operators). If a function is to appear as a formula, it must have two components, one is the equal sign before the function name, and the other is the function itself.

(b) The parameters of the function

The part of the function's right parenthesis is called a parameter, and if a function can use more than one argument, the argument is delimited with a half-width comma. Arguments can be constants (numbers and text), logical values (such as truth or false values), arrays, error values (such as #n/a), or cell references (such as E1:H1), or even another or several functions. The type and location of the parameter must satisfy the function syntax, or an error message will be returned.

1. constant

A constant is a number or text that is entered directly into a cell or formula, or a number or text value represented by a name, such as the number "2890.56", the date "2003-8-19", and the text "Dawn" as constants. But either the formula or the result calculated by the formula is not a constant, because as long as the parameter of the formula changes, it will change itself or the calculated result.

2. Logical value

Logical value is a special kind of parameter, it is only true or false two types. For example, in the formula "=if (A3=0," ", A2/a3)", "a3=0" is a parameter that can return either true or false results. When "A3=0" is true, fill in "0" in the cell where the formula is located, or fill in the cell with the result of "a2/a3."

3. Array

Arrays are used to produce multiple results, or you can calculate formulas that hold a set of parameters in rows and columns. The WPS table has a constant and a range of two types of arrays. The former is placed in the "{}" (press Ctrl+shift+enter key combination automatically generated) inside, and the values of the internal columns to be separated by commas, "", the values of each row with a semicolon ";" Separated. If you want to represent 90, 76, 80 in lines 56, 78, 89, and 2nd of line 1th, you should create a constant array of 2 row 3 columns "{56,78,89;90,76,80}."

A range array is a rectangular range of cells in which cells share a formula. For example, when the formula "=trend (B1:B3,A1:A3)" is used as an array formula, the rectangular range of cells that it refers to "b1:b3,a1:a3" is an array of regions.

4. Error value

The main use of error values as arguments is informational functions, such as "error." TYPE "function is an error value as an argument. Its syntax is "ERROR." TYPE (Error code), and returns a value of "6" if the argument is #num!.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.