Advanced Excel Formulas
Advanced Excel Formulas
IF Statements
If x is true do y if not do z. If statements follow the logic displayed above. They are split into 3 sections, known as the logical test, value if true and value if false..
Examples
=if(c3>b3,Over,Under) = Over
C3 > B3 is the Logical Test. The only criterion for this test is that is a statement which Excel can verify is either true or false. It can be any formula(s) or function(s) and can refer to cells in the same sheet, another sheet in the same workbook or in a different workbook. -1-
Over = The value if true. This is the text, value, function or formula that will be returned when the logical statement is true. Under = The value if false. This is the text, value function or formula that will be returned when the logical statement is false.
VLookups
The VLOOKUP function looks up the value in the first column of a lookup table and returns the corresponding value in a specified table column.. The Lookup table is arranged. The syntax for the VLOOKUP function is VLOOKUP(lookup_value,table_array,col_index_num,range_lookup) Lookup_value The value to be looked up in the first column of the lookup table. Table_array The range that contains the lookup table Col_index_num The column number from within the table from which the matching value is returned. Range_lookup Optional. If TRUE or emitted then where an exact match is not found , the next largest value that is less than the lookup_value is returned. If FALSE, VLOOKUP will search for an exact match. If VLOOKUP cannot find and exact match the function returns #N/A.
Example
To find the price of product code B04 in cell C14 =vlookup(a14,A2:C11,3,false). Result 260 -2-
Lookup Reference = A14. Looks up the value B04 against cells A2:A11. Table Array = A2:C11. The first column of this table must contain the values that the lookup reference is compared against. The table must also include the column with the values that need to be returned. Column Index Number = 3. This number represents the position of the column that is going to return the values to be displayed. In this case as column A is 1, Column B is 2 and C is therefore 3. To display the product name change the index no. to 2. Range lookup = false. We only want a value a result returned in Cell C14 if there is an exact match between cell A14 and one of the cells in the range A2:A11
-3-
Lookup_value B9. Table_array C1:H3 Row_index_num 3 the tax rate row Range_lookup Left blank so this equals true. Therefore is no exact match is found the next largest value less than the lookup value is found.
-4-
To select this are in future click the drop down beside the cell reference and choose the appropriate named range (see below).
-5-