FREE Excel STUFF
SearchSearch Excel Content
Excel Help. Popular
NEW! Multiple Excel Search & Links
Excel Formulas
Excel Macros
Excel Newsletter
PRODUCTS
Up to $139.00 FREE!
Categories & SearchSearch for software
Excel Templates
Excel Add-ins
Excel Training
More....
OTHER
Excel Development


EXCEL FORMULAE ARGUMENTS & SYNTAX


NEW! More Books..
Add to Google advanced search! Free Help!

Add Excel Answers & Search To Your Google Toolbar Details

Lesson 18 - Excel Arguments and Syntax in Formulas

Current Special! Complete Excel Excel Training Course for Excel 97 - Excel 2003, only $145.00. $59.95 Instant Buy/Download, 30 Day Money Back Guarantee & Free Excel Help for LIFE!

EXCEL FORMULAE ARGUMENTS & SYNTAX

Now we have been through the ways and means of referencing cells we can move on to the SUM function in Excel. Without doubt the SUM function is one of the most commonly used Excel functions. I will also use the SUM function to better explain what Arguments are in functions and what the Syntax of a Function is.

Arguments

Most of Excels functions need values of some sort to perform calculations and it is these values that are known as arguments. The argument for a function could be in the form of a number, text or logical value such as TRUE or FALSE. They could also be error values or arrays, but we won't go into this at this level.

Some functions will take only one argument while others can take up to 30. The SUM function for example takes up to thirty arguments, but only requires one. There are other functions that take 5 or 6 arguments and require that all the arguments have a value in them. Commas are always used to separate arguments in functions.

Syntax

The term syntax in Excel refers to the order in which arguments are accepted in functions. For example, if we have a function that takes two arguments and the first argument must be a number, while the second must be text we could not put the text value as the first argument and the number as the second. If we did we would have the wrong syntax

Now we have discussed Arguments and Syntax we can move on to creating a formula in Excel using the SUM function. The SUM function will add all the numbers in a range of cells. If there is text within the range the SUM function will ignore them. However the SUM function will not ignore text values not stored in cells (a text value is a number entered as text). I will use an example to show you what I mean by this statement.

You should get the result 15 and if you select cell A11 and look in the formula bar you should see the formula =SUM(A1:A10). If we now type the number 5 in cell A6 we will get the result 20. If we type the word dog in cell A7 our result will not change. If we then type: "5" (including the quotation marks) the SUM function will again not change. This is because the SUM function will ignore text entered in cells.

To see what I mean by my previous statement "However the SUM function will not ignore text values not stored in cells" we will need to add another argument. Remember Commas are always used to separate arguments in functions, so we shall do is what is known as edit our formula. The easiest method to edit a simple function like the SUM is to do so from within the Formula bar.

This time our result in cell A11 will change to 25. This shows that while the SUM function will ignore text values stored in cells it does not ignore text values enter directly as an argument.

The range of cells that we use as an argument in the SUM function do not have to be adjoining as in the above example (A1:A10) they can be in non-adjoining ranges. This is the most likely reason we would use more than one argument.

You should get the sum value of all numbers in the ranges A1:A10 and D1:D5

We can make this task slightly easier by selecting the range A1:A10 then holding down the Ctrl key, select range D1:D5 and up to another 28 ranges if we wanted to.

If the numbers we wish to sum reside on another Worksheet, we would simply click the sheet name tab first then select the range on the Worksheet. If we want to sum numbers on both the Worksheets housing the sum formula and on another Worksheet, we could use the first argument for the current sheet and the second argument for the other sheet. If we wanted to sum the same range of cells on different Worksheets that are next to each other we could do so like this:

Depending on the Worksheet names, order and range chosen, your formula should look something like: =SUM(Sheet1:Sheet5!D1:G20)If you now type any numbers within your chosen range on any of the Worksheets, they will affect the result of the SUM formula accordingly. We should also note that if we add another Worksheet anywhere between our chosen sheets it too will have the chosen range included (D1:G20 in my example).

Go To Free Excel Training Lesson 19 .  Back to Previous Lesson

Go to Excel Basic/Level 1 Training Index

Excel Dashboard Reports & Excel Dashboard Charts 50% Off

Special! Free Choice of Complete Excel Training Course OR Excel Add-ins Collection on all purchases totaling over $64.00. ALL purchases totaling over $150.00 gets you BOTH! Purchases MUST be made via this site. Send payment proof to special@ozgrid.com 31 days after purchase date.


Instant Download and Money Back Guarantee on Most Software

Excel Trader Package Technical Analysis in Excel With $139.00 of FREE software!

Add to Google Search Tips FREE Excel Help

Microsoft ® and Microsoft Excel ® are registered trademarks of Microsoft Corporation. OzGrid is in no way associated with Microsoft