Originally Posted by
Phlenin
Ok now don't laugh at me. I really am trying to understand how these formulas are written.
No-one here will laugh at you for not knowing something - we all started out that way.
Originally Posted by
Phlenin
I have a cell that I want to calculate like this --- If C8 is $4500 or less, I want it to multiply by 9%, if it is greater than $4500, I want it to multiply by 13%.
John Topley's formula in post 8 will do it.
Originally Posted by
Phlenin
I'm not understanding what the formula "says" if that makes sense. I understand from your last explanation ... that a coma says "then" in the formula. I just don't understand what all the different parts of the formula "communicate" or indicate to be done, if that makes sense.
All Excel formulae are built from different 'functions'. In each function, the commas separate different parts so that Excel can follow through logically. What each part between the commas 'means' to Excel varies depending on what the function is.
If you type a function name and a bracket into Excel, a tool-tip will pop up showing the different parts of the function, with the part you're 'in' shown in bold.
For example, let's take the IF function, since that's the one you're using at the moment.1. In A1, put the number 1.
2. In B1, start typing: =IF(
The tool-tip will show: IF(logical_test, [value_if_true], [value_if_false])
So the part of the function you're 'in' is the 'logical test' - meaning 'Excel, check if this statement is true or false'.
3. Continue typing: =IF(A1=1,
The tool-tip will change to IF(logical_test, [value_if_true], [value_if_false])
So Excel now wants you to tell it what to give you if the check it's just done has come out true.
4. Continue typing: =IF(A1=1,"A1 is one"
To Excel this means: if the test 'A1=1' is 'True' then give the result "A1 is one" (the quotation marks surround something you want as text).
The tool-tip will still be the same, because you haven't yet typed a comma to leave the 'if true' section of the formula.
5. Type a comma further: =IF(A1=1,"A1 is one",
The tool-tip will now read: IF(logical_test, [value_if_true], [value_if_false])
Excel now wants you to tell it what to give you if the result of the check is False (that is, if A1 is not equal to 1).
6. Continue typing: =IF(A1=1,"A1 is one","A1 is another number"
You've now told Excel to give you the result 'A1 is another number' if A1 is not equal to 1.
The tool-tip stays the same as above, because you haven't yet finished the formula by closing it with a bracket.
7. Finish the formula with a bracket: =IF(A1=1,"A1 is one","A1 is another number")[/COLOR]
The tool-tip will disappear because you've finished the formula.
See the attached pic with the tool-tips shown.
You can nest different functions inside each other - or multiple instances of the same function, which is often done with IF.
For example:
=IF(A1=1, "A1 is one", IF(A1=2, "A1 is two", "A1 is another number" ))
This tells Excel to first check if A1=1. If it is, you get 'A1 is one'. If it's not, Excel will then check if A1=2. If that is true, you get 'A1 is two'. If it's not, you get 'A1 is another number'. Note that there are two brackets at the end of the formula, because you've got two functions.
Luckily, the tool-tip will change to show you where you are in each nested function (see second attached pic).
Regarding what commas 'mean', Excel will start at the left of a formula and move to the right, with each comma separating one part of the function from the next. For example, for DATE, the function is: DATE(year, month, day). In this, each part of the function doesn't depend on the others - the commas are there to remove any ambiguity. For example, the date 2017111 could be 1st Nov 2017 or 11th Jan 2017 - so the function is written to make it clear to Excel what you mean: DATE(2017,1,11) is clearly different from DATE(2017,11,1).
Another way to enter functions is to click on the little fx symbol to the left of the formula bar. Search for the function you think you need and you'll get a list of functions which include it. Select the closest one to what you want and click 'Go'. The window which pops up then gives guidance on what to put in each section of the function. See more attached pics.
The Excel help files are actually quite helpful in explaining individual functions. Alternatively, this site is a good one to get explanations of individual functions: http://www.excelfunctions.net (for example, IF is here: http://www.excelfunctions.net/ExcelIf.html; and DATE is here: http://www.excelfunctions.net/ExcelDateFunction.html).
Sorry if that's a bit long and perhaps over-simplified, but I hope it helps.
Bookmarks