What is parameters in excel

On the Data tab, in the Connections group, click Properties. In the Connection Properties dialog box, click the Definition tab, and then click Parameters. In the Parameters dialog box, in the Parameter name list, click the parameter that you want to change. Click Get the value from the following cell.

Contents

  • 1 How do I set parameters in Excel Power query?
  • 2 What is a parameter Excel?
  • 3 How do you manage parameters in power query?
  • 4 What is an option for suggested values when defining a parameter?
  • 5 How do you fix Parameters in Excel?
  • 6 What is a parameter query?
  • 7 How do you create a parameter query?
  • 8 What is a parameter table?
  • 9 How do I find the query properties in Excel?
  • 10 Where is Solver Parameters Excel?
  • 11 What fit parameters?
  • 12 How do you set parameter values in access?
  • 13 What is an aggregate query?
  • 14 How do I use a query parameter in REST API?
  • 15 What is the difference between select and parameter query?
  • 16 What are parameters in database?
  • 17 What is a parameterized SQL query?
  • 18 How do you pass parameters to a table valued function?
  • 19 Can we pass table name as parameter in stored procedures?
  • 20 What is a parameter in DAX?

How do I set parameters in Excel Power query?

Create a parameter

  1. Select Data > Get Data > Other Sources > Launch Power Query Editor.
  2. In the Power Query Editor, select Home > Manage Parameters > New Parameters.
  3. In the Manage Parameter dialog box, select New.
  4. Set the following as needed: Name.
  5. To create the parameter, select OK.

What is a parameter Excel?

When you query data in Excel, you might want to use an input value – a parameter – to specify something about the query.Parameters can prompt the user for an input value when the query is run or refreshed, use a constant as the input value, or use the contents of a specified cell as the input value.

How do you manage parameters in power query?

Manage Parameters By Power Query

  1. Step 1: Create a List Query to Manage Parameters. We have created the list query using ‘Add as New Query’ option in Power Query as shown below.
  2. Step 2: Select Manage Parameters option. To select Manage Parameters option in Power Query, go to-
  3. Step 3: Close & Apply.

What is an option for suggested values when defining a parameter?

Suggested Values—Provides the user with suggestions to select a value for the Current Value from the available options:From here you can select what should be the default value for this parameter, which will be the default value shown to the user when referencing the parameter.

How do you fix Parameters in Excel?

Step through Solver trial solutions

  1. In Excel 2016 for Mac: Click Data > Solver.
  2. After you define a problem, in the Solver Parameters dialog box, click Options.
  3. Select the Show Iteration Results check box to see the values of each trial solution, and then click OK.
  4. In the Solver Parameters dialog box, click Solve.

What is a parameter query?

A parameter query is one of the simplest and most useful advanced queries you can create. It allows you to create a query that can be updated easily to reflect a new search term. When you open a parameter query, Access will prompt you for a search term and then show you query results that reflect your search.

How do you create a parameter query?

Create a parameter query

  1. Create a select query, and then open the query in Design view.
  2. In the Criteria row of the field you want to apply a parameter to, enter the text that you want to display in the parameter box, enclosed in square brackets.
  3. Repeat step 2 for each field you want to add parameters to.

What is a parameter table?

A Parameter Table determines the values for each set of parameters. When you choose a set of parameters and regenerate the notebook, the values in the notebook update to reflect those of the set.A notebook is not parametric and does not update according to the parameter values.

How do I find the query properties in Excel?

In Excel Select Data > Queries & Connections > Queries tab. In the Power Query Editor Select Data > Get Data > Launch Power Query Editor, and view the Queries pane on the left.

Where is Solver Parameters Excel?

To let the Excel Solver know which cells on the worksheet represent the decision variables, constraints and objective function, we click Solver button on the Excel Data tab, or the Premium Solver button on the Add-Ins tab, which displays the Solver Parameters dialog.

What fit parameters?

Parametric fitting involves finding coefficients (parameters) for one or more models that you fit to data. The data is assumed to be statistical in nature and is divided into two components: data = deterministic component + random component.

How do you set parameter values in access?

To specify the data type for parameters in a query, follow these steps: With the query open in Design view, on the Design tab, in the Show/Hide group, click Parameters. In the Query Parameters dialog box, in the Parameter column, type the prompt for each parameter for which you want to specify the data type.

What is an aggregate query?

An aggregate query is a method of deriving group and subgroup data by analysis of a set of individual data entries. The term is frequently used by database developers and database administrators.The term “aggregate query” is quite common in nearly all database software documentation.

How do I use a query parameter in REST API?

A REST API can have parameters in at least two ways:

  1. As part of the URL-path (i.e. /api/resource/parametervalue )
  2. As a query argument (i.e. /api/resource? parameter=value )

What is the difference between select and parameter query?

Explanation: A select query is the most common type of query.A parameter query is a query that when run displays its own dialog box prompting you for information, such as criteria for retrieving records or a value you want to insert in a field.

What are parameters in database?

Parameters are used to exchange data between stored procedures and functions and the application or tool that called the stored procedure or function: Input parameters allow the caller to pass a data value to the stored procedure or function.

What is a parameterized SQL query?

Parameterized SQL queries allow you to place parameters in an SQL query instead of a constant value. A parameter takes a value only when the query is executed, which allows the query to be reused with different values and for different purposes.

How do you pass parameters to a table valued function?

How to pass multiple parameters into an Inline table-valued function

  1. Creating a user-defined table type: CREATE TYPE ProductNumberList AS TABLE.
  2. Adding the table-valued to udfGetProductList function with READONLY statement:
  3. Declare a variable as a table-valued parameter and populate it with multiple parameter values.

Can we pass table name as parameter in stored procedures?

Passing table-valued parameters to a stored procedure is a three-step process: Create a user-defined table type that corresponds to the table that you want to populate.Inside the stored procedure, select the data from the passed parameter and insert it into the table that you want to populate.

What is a parameter in DAX?

The parameter table pattern is used to create parameters in a report, so that users can interact with slicers and dynamically change the behavior of the report itself.The main advantage of writing the calculated table manually in DAX is that it provides greater flexibility in the parameters to use.

Содержание

  1. How To Set Parameters In Excel?
  2. How do I set parameters in Excel Power query?
  3. What is a parameter Excel?
  4. How do you manage parameters in power query?
  5. What is an option for suggested values when defining a parameter?
  6. How do you fix Parameters in Excel?
  7. What is a parameter query?
  8. How do you create a parameter query?
  9. What is a parameter table?
  10. How do I find the query properties in Excel?
  11. Where is Solver Parameters Excel?
  12. What fit parameters?
  13. How do you set parameter values in access?
  14. What is an aggregate query?
  15. How do I use a query parameter in REST API?
  16. What is the difference between select and parameter query?
  17. What are parameters in database?
  18. What is a parameterized SQL query?
  19. How do you pass parameters to a table valued function?
  20. Create a parameter query in Microsoft Query
  21. Create a parameter query (Power Query)

How To Set Parameters In Excel?

On the Data tab, in the Connections group, click Properties. In the Connection Properties dialog box, click the Definition tab, and then click Parameters. In the Parameters dialog box, in the Parameter name list, click the parameter that you want to change. Click Get the value from the following cell.

How do I set parameters in Excel Power query?

Create a parameter

  1. Select Data > Get Data > Other Sources > Launch Power Query Editor.
  2. In the Power Query Editor, select Home > Manage Parameters > New Parameters.
  3. In the Manage Parameter dialog box, select New.
  4. Set the following as needed: Name.
  5. To create the parameter, select OK.

What is a parameter Excel?

When you query data in Excel, you might want to use an input value – a parameter – to specify something about the query.Parameters can prompt the user for an input value when the query is run or refreshed, use a constant as the input value, or use the contents of a specified cell as the input value.

How do you manage parameters in power query?

Manage Parameters By Power Query

  1. Step 1: Create a List Query to Manage Parameters. We have created the list query using ‘Add as New Query’ option in Power Query as shown below.
  2. Step 2: Select Manage Parameters option. To select Manage Parameters option in Power Query, go to-
  3. Step 3: Close & Apply.

What is an option for suggested values when defining a parameter?

Suggested Values—Provides the user with suggestions to select a value for the Current Value from the available options:From here you can select what should be the default value for this parameter, which will be the default value shown to the user when referencing the parameter.

How do you fix Parameters in Excel?

Step through Solver trial solutions

  1. In Excel 2016 for Mac: Click Data > Solver.
  2. After you define a problem, in the Solver Parameters dialog box, click Options.
  3. Select the Show Iteration Results check box to see the values of each trial solution, and then click OK.
  4. In the Solver Parameters dialog box, click Solve.

What is a parameter query?

A parameter query is one of the simplest and most useful advanced queries you can create. It allows you to create a query that can be updated easily to reflect a new search term. When you open a parameter query, Access will prompt you for a search term and then show you query results that reflect your search.

How do you create a parameter query?

Create a parameter query

  1. Create a select query, and then open the query in Design view.
  2. In the Criteria row of the field you want to apply a parameter to, enter the text that you want to display in the parameter box, enclosed in square brackets.
  3. Repeat step 2 for each field you want to add parameters to.

What is a parameter table?

A Parameter Table determines the values for each set of parameters. When you choose a set of parameters and regenerate the notebook, the values in the notebook update to reflect those of the set.A notebook is not parametric and does not update according to the parameter values.

How do I find the query properties in Excel?

In Excel Select Data > Queries & Connections > Queries tab. In the Power Query Editor Select Data > Get Data > Launch Power Query Editor, and view the Queries pane on the left.

Where is Solver Parameters Excel?

To let the Excel Solver know which cells on the worksheet represent the decision variables, constraints and objective function, we click Solver button on the Excel Data tab, or the Premium Solver button on the Add-Ins tab, which displays the Solver Parameters dialog.

What fit parameters?

Parametric fitting involves finding coefficients (parameters) for one or more models that you fit to data. The data is assumed to be statistical in nature and is divided into two components: data = deterministic component + random component.

How do you set parameter values in access?

To specify the data type for parameters in a query, follow these steps: With the query open in Design view, on the Design tab, in the Show/Hide group, click Parameters. In the Query Parameters dialog box, in the Parameter column, type the prompt for each parameter for which you want to specify the data type.

What is an aggregate query?

An aggregate query is a method of deriving group and subgroup data by analysis of a set of individual data entries. The term is frequently used by database developers and database administrators.The term “aggregate query” is quite common in nearly all database software documentation.

How do I use a query parameter in REST API?

A REST API can have parameters in at least two ways:

  1. As part of the URL-path (i.e. /api/resource/parametervalue )
  2. As a query argument (i.e. /api/resource? parameter=value )

What is the difference between select and parameter query?

Explanation: A select query is the most common type of query.A parameter query is a query that when run displays its own dialog box prompting you for information, such as criteria for retrieving records or a value you want to insert in a field.

What are parameters in database?

Parameters are used to exchange data between stored procedures and functions and the application or tool that called the stored procedure or function: Input parameters allow the caller to pass a data value to the stored procedure or function.

What is a parameterized SQL query?

Parameterized SQL queries allow you to place parameters in an SQL query instead of a constant value. A parameter takes a value only when the query is executed, which allows the query to be reused with different values and for different purposes.

How do you pass parameters to a table valued function?

How to pass multiple parameters into an Inline table-valued function

  1. Creating a user-defined table type: CREATE TYPE ProductNumberList AS TABLE.
  2. Adding the table-valued to udfGetProductList function with READONLY statement:
  3. Declare a variable as a table-valued parameter and populate it with multiple parameter values.

Источник

Create a parameter query in Microsoft Query

When you query data in Excel, you might want to use an input value — a parameter — to specify something about the query. To do this, you create a parameter query in Microsoft Query:

Parameters are used in the query’s WHERE clause – they always function as a filter for retrieved data.

Parameters can prompt the user for an input value when the query is run or refreshed, use a constant as the input value, or use the contents of a specified cell as the input value.

A parameter is part of the query it modifies, and cannot be reused in other queries.

Note If you want the other way to create parameter queries, see Create a parameter query (Power Query).

Click Data > Get & Transform Data > Get Data > From Other Sources > From Microsoft Query.

Follow the Query Wizard steps. On the Query Wizard – Finish screen, select View data or edit query in Microsoft Query and then click Finish. The Microsoft Query window opens and displays your query.

Click View > SQL. In the SQL dialog box that appears, find the WHERE clause – a line starting with the word WHERE, typically at the end of the SQL code. If there is no WHERE clause, add one by typing WHERE on a new line at the end of the query.

After WHERE, type the field name, a comparison operator (=, , LIKE, etc.), and one of the following:

For a generic parameter prompt, type a question mark (?). No helpful phrase is displayed in the prompt that appears when the query is run.

For a parameter prompt that helps people provide valid input, type a phrase enclosed in square brackets. The phrase displays in the parameter prompt when the query is run.

After you finish adding conditions with parameters to the WHERE clause, click OK to run the query. Excel prompts you to provide a value for each parameter, then Microsoft Query displays the results.

When you are ready to load the data, close the Microsoft Query window to return the results to Excel. The Import Data dialog box opens.

To review your parameters, click Properties. Then in the Connection Properties dialog box, on the Definition tab click Parameters.

The Parameters dialog box displays the parameters used in the query. Select a parameter under Parameter name to review or change How parameter value is obtained. You can change the parameter prompt, enter a specific value, or specify a cell reference.

Click OK to save your changes and close the Parameters dialog box, then in the Import Data dialog box click OK to display the query results in Excel.

Источник

Create a parameter query (Power Query)

You may be quite familiar with parameter queries with their use in SQL or Microsoft Query. However Power Query parameters have key differences:

Parameters can be used in any query step. In addition to functioning as a data filter, parameters can be used to specify such things as a file path or a server name.

Parameters don’t prompt for input. Instead, you can quickly change their value using Power Query. You can even store and retrieve the values from cells in Excel.

Parameters are saved in a simple parameter query, but are separate from the data queries they are used in. Once created, you can add a parameter to queries as needed.

Note If you want the other way to create parameter queries, see Create a parameter query in Microsoft Query.

You can use a parameter to automatically change a value in a query and avoid editing the query each time to change the value. You just change the parameter value. Once you create a parameter, it is saved in a special parameter query which you can conveniently change directly from Excel.

Select Data > Get Data > Other Sources > Launch Power Query Editor.

In the Power Query Editor, select Home > Manage Parameters > New Parameters.

In the Manage Parameter dialog box, select New.

Set the following as needed:

This should reflect the parameter’s function, but keep it as short as possible.

This can contain any details that will help people correctly use the parameter.

Do one of the following:

Any Value You can enter any value of any data type in the parameter query.

List of Values You can limit the values to a specific list by entering them in the small grid. You must also select a Default Value and a Current Value below.

Query Select a list query, which resembles a List structured column separated by commas and enclosed in braces.

For example, an Issues status field could have three values: <«New», «Ongoing», «Closed»>. You must create the list query beforehand by opening the Advanced Editor (select Home > Advanced Editor), removing the code template, entering the list of values in the query list format, and then selecting Done.

Once you finish creating the parameter, the list query is displayed in your parameter values.

This specifies the data type of the parameter.

If desired, add a list of values or specify a query to provide suggestions for input.

This only appears if Suggested Values is set to List of values, and specifies which list item is the default. In this case, you must choose a default.

Depending on where you use the parameter, if this is blank the query might return no results. If Required is selected, Current Value cannot be empty.

To create the parameter, select OK.

Here’s a way to manage changes to data source locations and help prevent refresh errors. For example, assuming a similar schema and data source, create a parameter to easily change a data source and help prevent data refresh errors. Sometimes the server, database, folder, file name, or location changes. Perhaps a database manager occasionally swaps out a server, a monthly drop of CSV files goes into a different folder, or you need to easily switch between a development/test/production environment.

Step 1: Create a parameter query

In the following example, you have several CSV files that you import using the import folder operation (Select Data > Get Data > From Files > From Folder) from folder C:DataFilesCSV1. But sometimes a different folder is occasionally used as a location to drop the files, C:DataFilesCSV2. You can use a parameter in a query as a substitute value for the different folder.

Select Home > Manage Parameters > New Parameter.

Enter the following information in the Manage Parameter dialog box:

Alternate file drop location

Step 2: Add the parameter to the data query

To set the folder name as a parameter, in Query Settings, under Query Steps, select Source, and then select Edit Settings.

Make sure the File path option is set to Parameter, and then select the parameter you just created from the drop-down list.

Step 3: Update the parameter value

The folder location just changed, so now you can simply update the parameter query.

Select Data > Connections & Queries > Queries tab, right click the parameter query, and then select Edit.

Enter the new location in the Current Value box, such as C:DataFilesCSV2.

Select Home > Close & Load.

To confirm your results, add new data to the data source, and then refresh the data query with the updated parameter (Select Data > Refresh All).

Sometimes you want an easy way to change the filter of a query to obtain different results without either editing the query or making slightly different copies of the same query. In this example, we change a date to conveniently change a data filter.

To open a query, locate one previously loaded from the Power Query Editor, select a cell in the data, and then select Query > Edit. For more information see Create, load, or edit a query in Excel.

Select the filter arrow in any column header to filter your data, and then select a filter command, such as Date/Time Filters > After. The Filter Rows dialog box appears.

Select the button to the left of the Value box, and then do one of the following:

To use an existing parameter, select Parameter, and then select the parameter you want from the list that appears on the right.

To use a new parameter, select New Parameter, and then create a parameter.

Enter the new date in the Current Value box, and then select Home > Close & Load.

To confirm your results, add new data to the data source, and then refresh the data query with the updated parameter (Select Data > Refresh All). For example, change the filter value to a different date to see new results.

Enter the new date in the Current Value box.

Select Home > Close & Load.

To confirm your results, add new data to the data source, and then refresh the data query with the updated parameter (Select Data > Refresh All).

In this example, the value in the query parameter is read from a cell in your workbook. You don’t have to change the parameter query, you just update the cell value. For example, you want to filter a column by the first letter, but easily change the value to any letter from A to Z.

On the worksheet in a workbook where the query you want to filter is loaded, create an Excel table with two cells: a header and a value.

Select a cell in the Excel table, then select Data > Get Data > From Table/Range. The Power Query Editor appears.

In the Name box of the Query Settings pane on the right, change the query name to be more meaningful, such as FilterCellValue.

To pass the value in the table, and not the table itself, right-click the value in Data Preview, and then select Drill Down.

Notice that the formula changed to = #»Changed Type»<0>[MyFilter]

When you use the Excel Table as a filter in step 10, Power Query references the Table value as the filter condition. A direct reference to the Excel Table would cause an error.

Select Home > Close & Load > Close & Load To. You now have a query parameter named «FilterCellValue» that you use in step 12.

In the Import Data dialog box, select Only Create Connection, and then select OK.

Open the query you want to filter with the value in the FilterCellValue table, one previously loaded from the Power Query Editor, by selecting a cell in the data, and then selecting Query > Edit. For more information see Create, load, or edit a query in Excel.

Select the filter arrow in any column header to filter your data, and then select a filter command, such as Text Filters > Begins With. The Filter Rows dialog box appears.

Enter any value in the Value box, such as «G» and then select OK. In this case, the value is a temporary placeholder for the value in the FilterCellValue table which you enter in the next step.

Select the arrow on the right side of the formula bar to display the whole formula. Here’s an example of a filter condition in a formula:

= Table.SelectRows(#»Changed Type», each Text.StartsWith([Name], «G»))

Select the value of the filter. In the formula, select «G».

Using M Intellisense, enter the first few letter of the FilterCellValue table you created, and then select it from the list that appears.

Select Home > Close > Close & Load.

Your query now uses the value in the Excel Table that you created to filter the query results. To use a new value, edit the cell contents in the original Excel table in step 1, change «G» to «V», and then refresh the query.

You can control whether parameter queries are allowed or not allowed.

In the Power Query Editor, select File > Options and Settings > Query Options > Power Query Editor.

In the pane on the left, under GLOBAL, select Power Query Editor.

In the pane on the right, under Parameters, select or clear Always allow parameterization in data source and transformation dialogs.

Источник


Asked by: Fen Agosti


asked in category: technology and computing Last Updated: 8th September, 2020

Parameter represents a single parameter used in a parameter query. This page provides code for the methods of the Excel class Parameter: Add, Delete, SetParam, Item.

Click to read more on it. Subsequently, one may also ask, how do you fix parameters in Excel?

Create a cell with the constant value you want to reference. Create a formula in a cell that performs your calculation. In the formula where you reference the value you created in step 1, add a “$” before the letter (representing the column) and number (representing the row).

Additionally, what are the parameters? A parameter is a limit. In mathematics a parameter is a constant in an equation, but parameter isn’t just for math anymore: now any system can have parameters that define its operation. You can set parameters for your class debate.

Also Know, how do I pass a parameter to a SQL query in Excel?

Click the Properties button and go to its Definition tab and change its Command Type to «SQL» and in the Command Text box enter the name of stored procedure we created above and pass the parameters initially using empty quotes for the parameter values as shown below.

What is a parameter in power query?

As a simple explanation, a parameter is just a normal query, in which we drill down into the value itself and load as a connection. In this example, we will be using an Excel Table as the source, but it could equally be in named range, CSV, or any other data source we can get into Power Query.

Hi everyone, first time authoring here and looking to pass on one of the neat, but less intuitive aspects of data management in Excel.

Often I find myself with data in an external database, such as Access and continuously editing the query there to get the data how I want it in Excel. With care, this can be done directly in Excel. (Using 2003, but earlier version will be similar).

Open a workbook and on the active sheet in cells A1 enter Start Date and in B1 enter the date 01/01/2003. In A2 enter End Date and in B2 enter the date 02/02/2003.

Start End Dates

Take the menu options Data>Import External Data>New Database Query…

External Data Menu

You will fire from here a dialog asking for your selection of an external datasource. We have chosen ‘MS Access Database’.

Data Source Dialog

Navigate your way to your Access database and select the table or query you want from the list displayed and add the fields you require, as below. (Remember, if you have a parameter query in Access already, this will create an error if we try to use it in Excel. ‘Too few parameters, expected 1’) .

Field Selection Dialog

Move on three screens making no changes until you arrive at the final screen (below). Take the second option to ‘View data or edit query in Microsoft Query’. This will launch Microsoft Query. (For those familiar with Access, this looks very similar to the query designer).

Finish Query

From the image below you can see we have shown the ‘criteria grid’ by selecting View>Criteria from the MS Query menus.

In our example we are going to take orders with a ship date between two dates, (01/01/2003 and 02/02/2003). To do this we enter the operator ‘Between’ followed by our first parameter. These are enclosed in square brackets and what is in here will, in certain circumstances, appear as the prompt in the input box, with the entry being the parameter. ‘Between [Enter the start date]’.

The next part is the ‘And’ operator followed by our second parameter, completing the parameter thus:

Between [Enter a start date] And [Enter an end date]

Microsoft Query

In MS Query select File>Return data to Microsoft Excel. You will be prompted for your two parameters. (start and end date), but you can ignore them. (Answer OK).

You will now get the dialog below, asking for the positioning on the sheet.

Sheet Position

Click the ‘parameters…’ button to show the dialog below. You now have three choices.

  1. Prompt for the values. (You can enter any prompt here).
  2. Use the following value. (You can enter a static value).
  3. Get the value from the following cell (Our example).

Remember to set how the value is obtained for all values and, if you want the data to update each time you change the value of the cell(s), then select the checkbox. (against each value again).

Parameter Selection

Click OK in the ‘Parameters’ dialog and select $A$4 as the cell for the start of the data, click ‘OK’ in the ‘import data’ dialog and your data should flow in filtered between the two dates supplied. Each time you change the dates, the query is refreshed with the new input.

Query Result

If you find you wish to change parameters or the way they action at a later date, this can be done in Excel via ‘Data>Import External Data>Parameters…’ or via the ‘External data’ toolbar. (Above).

Hope you can use this and any comments welcome

Nick Hodge
MVP – Excel

www.nickhodge.co.uk

Still cannot understand the functions and formulas in Excel or google sheets and trouble? The most basic excel or google sheets function parameters introduction, newcomers must see!

Table of Contents

  • ABSTRACT
  • – Arguments
  • – Constants
  • – Cell Reference & Range Reference
    • Cell Reference
    • Range Reference
    • Relative Reference:
    • Absolute Reference:
    • Mixed Reference:
  • – Array
  • – Logical Values
  • – Logical Operators
    • AND
    • NOT
    • OR
    • IF
  • – Error Values
    • Error: #NAME?
    • Error: #N/A
    • Error: #DIV/0!
    • Error: #NUM!
    • Error: #VALUE!
    • Error: #REF!
    • Error: #NULL!
    • Resolution
  • – Nested Functions

ABSTRACT

Our website introduces many basic uses of functions in Excel or google sheets as well as common examples from everyday life and work. We have also uploaded many articles on how to use functions to create formulas to solve common problems.

We found that, in fact, many people do not know much about Excel or google sheets functions, or a half-understanding, by reading our articles may solve the current problem, but they do not know how to use Excel or google sheets functions to create formulas when solving the problem, with what function? Which similar function to use? How to nest the formula? What is the input value? Why does it return an error?

We will have the above problems because we usually only think about how to quickly apply these functions as well as formulas to solve problems in a timely manner, and copy the formula directly to use it without thinking about how the formula works.

We will face a lot of problems, so before we learn Excel or google sheets functions and formulas, we must learn some basic concepts about functions and formulas, or a few basic elements that make up a function/formula. Then after understanding these basic concepts, you will really see how a formula is made up and what role each part plays in the formula.

– Arguments

Referring to the syntax structure of the function, each item in the function brackets is called an argument to the function. These arguments can be constants, cell reference, range reference, arrays, nested functions, etc. Next, we will introduce them according to different categories of arguments.

In the example below, number 1 and 2 are arguments to SUM function.

function and formula parameter1

– Constants

Constant is an immutable value or data item. A constant can be a specified value, array, or character/string. In a normal Excel or google sheets formula, in addition to the value itself, you can also enter a cell reference or range reference that contains the value(s).

Note: Neither the formula nor the result calculated by the formula is a constant, because whenever the argument of the formula changes, it will affect the formula calculation and change the result.

In the example below, arguments 1 and 2 are entered manually, they are constants.

function and formula parameter2

– Cell Reference & Range Reference

Cell reference and cell range reference are the most common arguments in Excel or google sheets functions. The purpose of the reference is to define the cell or range in the worksheet and specify the location of the data used by the formula or function, so that the function can easily use the data in various parts of the worksheet.

The values in cell references and range references can be static values, but they can also be dynamic values. The actual return value according to the change in the value of cell reference or range reference.

Cell Reference

In the example below, A2 and B2 are cell references. Number “1” is saved in cell reference A2, “2” is saved in cell B2. When selecting A2 in a function, that means number “1” in A2 is referenced.

A cell reference is delivered to function as its argument.

function and formula parameter3

Range Reference

The entire selected multiple cells can be seen a range reference. In Excel or google sheets, for the common used lookup function VLOOKUP, its lookup range argument is usually entered with a range reference.

In the example below, A2:B2 is a range reference, it is one argument to SUM function not two arguments. This range reference contains an array actually. We will introduce array in the following paragraph.

function and formula parameter4

When entering or typing function’s arguments, we can click on a single cell, or drag and drop to select multiple cells, in this way we can directly enter a cell reference or range reference.

We can also pre-define a name for a range reference in advance, in this way, we can enter this name directly as function’s argument when applying a function.

STEP 1: Name a range reference:

Formulas->Define Name, enter “Numbers” for selected range:

function and formula parameter5

OR

Select A1:B2->Enter “Numbers” in Name Box:

function and formula parameter6

STEP 2: Entering “Numbers” as argument.

function and formula parameter7

As functions or formulas are often copied directly to other cells through drag-and-drop operations, usually, the reference will change automatically according to the cell location where the formula is located.

If you do not want to change the reference, we must add a dollar sign in front of the row or column index. For these two cases, we divided the reference into relative reference and absolute reference.

Relative Reference:

When dragging down the formula, A1:C1 is automatically updated to A2:C2.

function and formula parameter8

Absolute Reference:

When dragging down the formula, $A$1:$C$1 is not changed. Because we add $ before row and column indexes, so range reference is locked.

function and formula parameter9

Mixed Reference:

When dragging down the formula, for range reference $A$1:C1, $A$1 is locked, but C1 is updated from C1 to C2 as formula is copied down to D2.

function and formula parameter10

– Array

Array, equivalent to our mathematical matrix, a matrix contains multiple elements, elements and different combinations of elements constitute a matrix of different dimensions.

In EXCLE workbook, the selected range can be expressed as an array, expressed as an N row * M column area, N and M are not 0.

The array formula is relative to the ordinary function formula; it has two characteristics.

1) Elements of the array are referenced by brackets {} and separated by commas or semicolons.

2) After entering an array formula, you must press Ctrl+Shift+Enter to load the result.

Example 1:

F1=SUM(A1:D1); A1:D1={1,2,3,4}; If all elements in on array are in one row, values are separated by comma.

function and formula parameter11

Example 2:

F1=SUM(A1:A4); A1:A4={1;2;3;4}; If all elements in on array are in one column, values are separated by semicolon.

function and formula parameter12

Example 3:

F1=SUM(A1:B2); A1:B2={1,2;3,4}; The array is a multidimensional array.

function and formula parameter13

– Logical Values

There are TRUE and FALSE two logical values. In Excel or google sheets, IF function is a logical test function that returns the corresponding branch value based on the two logical values TRUE and FALSE.

Example:

If logical test value is TRUE, IF function returns “Yes” else returns “No”.

function and formula parameter14

– Logical Operators

AND

Syntax: AND(logical1, logical2, …).

Description: Returns TRUE if all arguments are true; and If AND function detects an argument with a value of false, it returns false

Example:

If both conditions “N>3” and “M>5” are true, result is TRUE.

NOT

Syntax: NOT(logical)

Description: Find the opposite of a logical value or a logical expression. If you want to get the opposite of a logical value, you should use the NOT function.

Example:

Normally we can use IF function to create a logical test like =IF(A2>3,”TRUE”,”FALSE”) to return TRUE or FALSE result; Actually you can make it easier, you can also use “=NOT(A2>3)” to return the result of logical test “N<3”.

function and formula parameter16

OR

Syntax: OR(logical1, logical2, …)

Description: Returns TRUE when any of the logical values is true.

Example:

If one of the conditions “N>3” and “M>5” is true, result is TRUE.

function and formula parameter17

IF

The IF function is used to make logical judgments

Syntax: IF(logical_test, value_if_true, value_if_false)

Description: IF function performs a logical test which can return different results depending on the TRUE or FALSE of the logical expression.

Example:

Set “Yes” to logical test value of TRUE; Set “No” to logical test value of FALSE.

function and formula parameter18

– Error Values

Sometimes we don’t get the value we want after pressing the Enter key, and formula returns error value instead. These values usually consist of “#error!”.

When we find that an error is returned, we need to understand the meaning of these errors, they can help us to know what the cause of the error is and how to solve the error.

Below is a list of common error values and solutions in Excel or google sheets function applications.

Error: #NAME?

Explanation: The function was entered incorrectly with unrecognized text. For example, the function name is spelled incorrectly, the quoted text is not quoted, and so on.

Solution: Check for spelling errors, quotation marks and brackets

Example1: Function name “SUM” is spelled incorrectly

function and formula parameter19

Example2: Reference “Numbers” is missing

function and formula parameter20

Error: #N/A

Explanation: The lookup range cannot be found when using some lookup functions in Excel workbook (for example, the VLOOKUP function cannot find the input lookup range, or the lookup value cannot be found in the first column of the lookup range).

Solution: Check if the lookup range has been entered incorrectly; make sure the lookup value is in the first column of the lookup range.

Example 1: Lookup ID doesn’t exist in lookup table A2:B6.

function and formula parameter21

Example 2: Lookup value is incorrect; A is not listed in the first column of lookup table A2:B6.

function and formula parameter22

Error: #DIV/0!

Description: Function or formula has a divisor equal to 0 or the divisor cell is empty.

Solution: Change the divisor to a non-zero value.

Example:

function and formula parameter23

Error: #NUM!

Explanation: A non-numeric value has been entered in the numeric argument or is out of Excel’s calculation range.

Solution: Check the argument type and enter a valid type.

Error: #VALUE!

Explanation: Incorrect argument type entered, e.g., a number needs to be entered but text is entered, a value needs to be entered but multiple values are entered, etc. If it is an array formula, forget to press Control+Shift+Enter.

Solution: Check the argument type of the function and enter the correct type.

Example:

Divisor is “a”.

function and formula parameter24

Error: #REF!

Explanation: Cell reference or range reference is invalid. For example, clear value in the cell reference which is used by the formula, then formula reports this error code.

Solution: make sure reference is correct; check if the cell reference or range reference is empty, and if it is, re-enter values into values.

Example:

Lookup table exists in sheet2, but sheet2 is deleted.

function and formula parameter25

Error: #NULL!

Explanation: When multiple ranges are entered, the separator is incorrect; the intersection of multiple ranges is empty.

Solution: Change the separator; make the ranges intersect.

Example:

Separator is incorrect. It should be =SUM(A1:B1,A2:B2).

function and formula parameter26

Resolution

We can move mouse over the warning icon to show the floating indication message.  

function and formula parameter27

You can also click the icon to do the following operations.

function and formula parameter28

– Nested Functions

In addition to the arguments listed above, functions can also be used as arguments to a function, this is called nested function. The value of this internal function will be delivered to the external function as an argument value.

Example:

SUM(A2:B2)>3 is an argument (logical test) to IF function.

function and formula parameter29

This article introduces some basic concepts in Excel or google sheets function applications, which are the most basis information for new learners. You can bookmark this article so that you can refer to it when learning functions or building formulas.

Понравилась статья? Поделить с друзьями:
  • What is paragraph marks in word
  • What is page layout in word
  • What is page layout in excel
  • What is page break in excel
  • What is page break before in word