Writing Excel Function

This is an introduction lesion for Excel formula. We will learn writing formulas, understanding it’s syntax and scope.  Excel formula is also known as Excel functions so don’t be confused if any one of these terms is used here.

What is an Excel Formula?

Excel Formula or function is a pre defined function in Excel that accepts the values to manipulate. This simply returns a result or value after manipulation of inputted values in the function. Use of Excel functions makes tasks easier and faster.

Type of Excel Functions:

There following type of functions are used in Excel 2013, 10, 07 and 03:

  • Add-in and Automation functions
  • Cube functions
  • Database functions
  • Date and time functions
  • Engineering functions
  • Financial functions
  • Information functions
  • Logical functions
  • Lookup and reference functions
  • Math and trigonometry functions
  • Statistical functions
  • Text functions

Syntax: An Excel formula starts with equal to sign (=) followed by name of function and then the values passed within the brackets. Function syntax in Excel is not case sensitive. Lets see the syntax of Excel formula below:

=formula name(values)

After typing formula and hitting “Enter” or “Tab” button, it turns into an output in the same cell where formula was typed.  If formula syntax is incorrect then it will prompt an error else the result will be given.

Example 1:

Output: 30

Example 2:


Using Cell References:

In the examples above we have simply used numeric or text values in formula, what if you want add values from two different cell or want compare values of two different cells? Look at the example below:


The output will be 30 in A3 cell. Here we have used reference to cell A1 and A2 instead of numbers. Look at the second example below:


The output will be CORRECT in A3 cell. Here again we have checked with logical IF function comparing number in two different cells. You can also get values from any Excel workbook in your system using references. If you want get value from a workbook named “wbook2” into workbook named “wbook1” then you can simply open both workbooks and type equal to sign in a cell of book wbook1. Now switch to wbook2 and select the cell you want get value. Finally hit enter and you will see the value of cell in wbook2 to current cell of wbook1.

Numbers in a formula can be kept as it is but if you are using string in a function, you needs to keep them within double quotes.

If you want change the formula any time, you can do it by pressing F2 or the formula is visible in Formula Bar where you can edit it.

Getting Help With Excel ToolTip: Every time you start typing a formula, you get a tooltip below the cell which shows you the syntax of function you are typing. This feature is available in all new version of Excel. This is a great help feature for avoiding syntax errors.

Hope now you can write basic formulas in MS Excel.

Was this article helpful?