Excel 2010 Formulas
Excel 2010 Formulas
Contents
Layout ................................................................................................................................................................ 1 The Ribbon Bar .................................................................................................................................................. 2 Minimising the Ribbon Bar ............................................................................................................................. 2 The File Tab ....................................................................................................................................................... 3 What the Commands and Buttons do ........................................................................................................ 3 The Quick Access Toolbar................................................................................................................................. 4 Customising the Quick Access Toolbar ......................................................................................................... 4 Entering & editing simple formulas .................................................................................................................... 6 To enter a formula .......................................................................................................................................... 6 Range Finder ..................................................................................................................................................... 6 To locate or change cells referenced in a formula - ....................................................................................... 6 Entering formulas more efficiently ..................................................................................................................... 7 The AutoSum function ....................................................................................................................................... 7 Grand totals ................................................................................................................................................ 7 View totals .................................................................................................................................................. 7 Copying formulas ........................................................................................................................................... 7 Relative and absolute cell references ............................................................................................................ 8 Functions ........................................................................................................................................................... 8 Typing Functions ............................................................................................................................................ 8 Entering a formula containing a function ........................................................................................................ 8 Statistical functions ..................................................................................................................................... 9 Logical functions ......................................................................................................................................... 9 Lookup and Reference functions ................................................................................................................ 9 Using range names in formulas ....................................................................................................................... 10 Defining a range name ............................................................................................................................. 10 Navigating with range names ................................................................................................................... 10 Creating range names .............................................................................................................................. 10 Building formulas with range names ........................................................................................................ 10 Applying range names to formulas ........................................................................................................... 10 Naming a (constant) value ....................................................................................................................... 11 Calculations involving several sheets .............................................................................................................. 11 Linking files or worksheets with formulas..................................................................................................... 11 Grouping worksheets ................................................................................................................................... 11 Copying and entering formulas across a range ........................................................................................... 11 Consolidating data ........................................................................................................................................... 12 Array formulas ................................................................................................................................................. 13 Formula Examples ........................................................................................................................................... 14 A basic Mark Sheet .................................................................................................................................. 14 Basic Finance sheet ................................................................................................................................. 14
Updated 13/07/2010
Layout
Once you know your way around Excel youll find it much easier to use. Excel is made up of a number of different elements. Some of these elements, like the File Tab, Ribbon Bar and Quick Access tab may not be familiar to you if you have used another version of Office. If not, dont worry, they soon will be. 1. The File Tab is used to access file management functions such as saving, opening, closing, printing, etc. Options is also available here so that you can set your working preferences for the application (this replaces Tools > Options in 2003). 2. The Ribbon bar is the tabbed band that appears across the top of the window. It is the control centre of all office 2010 applications. Instead of menus, you can now use the tabs on the Ribbon to access commands which have been categorised into groups. The commands include galleries of formatting options that you can select from, such as the Styles gallery shown here. 3. The Quick Access Bar also known as the QAT is a small toolbar that appears at the top left-hand corner of the window. It is designed to provide access to the tools you use most frequently and includes by default the Save, Undo and Redo buttons. You can add buttons to the Quick Access Toolbar to make finding your favourite commands easier. 4. The Status Bar appears across the bottom of the window and displays application information, eg. sheets, cell count, auto sum amount, and so on. It can also be customised to have more functions showing by right-clicking on the bar and choosing the options. The View buttons and the Zoom Slider are used to change the view or to increase/decrease the zoom ratio for your document.
3 1 2
Recent New
1. You can add any command you like to the toolbar by selecting More Commands to display the Options dialog box. From here you can choose commands or tabs to add to the toolbar. Once in the QAT Toolbar you can place the icons into an order that suites your work by highlighting the icon and using the arrows on the right side to move up or down. You can even shift the Quick Access Toolbar below the ribbon if this suits the way you work.
2. By right clicking on a function (eg Autosum) you can add it to the Quick access bar.
To enter a formula
select a cell and type the equals symbol (=) begin typing the information (numbers or operator symbols) you can insert a cell reference into your entry by typing, by pointing and clicking the cell, or by selecting the range when finished, enter the information by pressing Enter OR by clicking on the tick button in the Formula bar if you change your mind about the entry you can cancel it with the ESC key OR the cross button in the formula bar, provided it has not yet been entered if you make a mistake while typing, use the Backspace key to remove a character to the left of the cursor once you have entered the formula, you can make changes by selecting the cell and clicking in the formula bar, OR by double clicking the cell, to go into edit mode Note: that by default numbers are align to the right and text is aliened to the left. You can change this if you want some different alignment. If a text entry is too long to display in the cell, it will seem to flow into the cell to the right if this is empty. Otherwise, it will appear truncated although it is all still actually in the cell. Number entries that are too long appear as #####. This is fixed by making the column wider. All formulas must begin with the = symbol. They may contain operators such as: + add subtract * multiply / divide
Range Finder
As you edit a formula, all cells and ranges to which the formula refers are displayed in colour, and a matching colour border is applied to the cells and ranges. Locating or changing the cells to which a formula refers using Range Finder
To locate or change cells referenced in a formula double-click the cell that contains the formula you want to change OR select the cell and click in the formula bar. Excel highlights each cell or range with a different colour to change a cell or range reference to a different cell or range, drag the colour-coded border of the cell or range to the new cell or range to include more or fewer cells in a reference, use the drag handle in the lower-right corner of the border to select more or fewer cells when you finish updating the references, press Enter (If the formula is an array formula, press Ctrl+Shift+Enter)
Grand totals
If your worksheet contains multiple subtotal values created with the SUM function, you can create a grand total for the values by using AutoSum. To create a grand total, click a cell below or to the right of the range that contains the subtotal values then click AutoSum. AutoSum will automatically select all the previous AutoSums.
View totals
If you simply want to display the total value of a range of cells without placing the total anywhere in the sheet, you can use the AutoCalculate feature. When you select cells, Excel shows the Average, Cell Count and sum of the range in the status bar at the bottom of the worksheet. AutoCalculate can perform different types of calculations for you. When you rightclick the status bar, you can select other functions such as the minimum, or maximum value of the selected range.
Copying formulas
You can use any of the methods you might use to copy data from one cell or range to another (including drag-and-drop) to copy a formula to another cell or range. A common way of copying formulas is to use the Fill function. Select the cell with the formula in it. In the lower right corner of the cell is the fill handle. (your cursor will change to a + sign when you are over it) Drag this in the direction you want to copy the formula too.
Functions
Earlier you used the SUM function in a formula as a way of shortening a tedious procedure. Excel has many inbuilt functions that not only speed up your work, but also permit you to perform very complex calculations and manipulations.
Typing Functions
If you are familiar with the function that you need you can type it into a cell exactly the same way you type any other formula. If you are not sure if Excel has a function or you cant quite remember how it is written you can use the Insert Function tool on the formula bar to assist you. When you click on this tool the Insert Function dialog box will be presented to you which lists the most recently used or common functions and also allows you to search for other functions that you might need. In the Formulas Tab they have also been grouped into 8 categories for step by step application.
Statistical functions
These functions calculate averages, minima, maxima, and so on. The required syntax is: =min(range) =max(range) =average(range) =count(range) =counta(range) The count function counts cells containing numbers, and the counta counts alphanumeric.
Logical functions
You probably make conditional decisions fairly often. These are where you deci de If A is the case I will do this, but if B is the case I will do that. In the same way logical functions allow Excel to produce different results depending on which condition(s) hold(s) true. The IF function is extremely useful for this purpose. It uses the following syntax: =IF(logical_test,value_if_true,value_if_false). That is, if the test is found to be true, value_if_true applies; otherwise value_if_false applies. Here are some examples of how it is used. =IF(J10>100,K10,L10) =IF(B6>M1*M6,C6*1.3,C6/1.3) =IF(M12>B7,150,F12*1.25) Complex IF function o =IF(AND(B55>100,B6<1),C4/C5,99) o =IF(OR(B6+C6=D6,E6=Yes),Balanced,Not balanced) Nested IF function o =IF(G7>=84.5,"HD",IF(G7>=74.5,"DN",IF(G7>=64.5,"CR",IF(G7>=49.5,"P","F")))) Note: the AND and OR complex operators used in the 4th and 5th examples. Also note that the simple arithmetic operators +, -, *, and / , and =, <, >, <=, >=, and <> can be used.
10
Grouping worksheets
If you are setting up a file in which several sheets are to have the same layout, formatting, and so on you can group the sheets and work on them simultaneously. That is, you can enter data or formulas and edit them, format a range in all grouped sheets, etc. You can even print several sheets together. To group sheets in a workbook select the first sheet by clicking its tab; THEN EITHER: hold the Shift key and select the last required sheet tab to group adjacent sheets OR: hold the Ctrl key and select further sheets in turn for non-adjacent sheets To select all sheets in the workbook - choose Select All Sheets when you right click on a sheet tab. To deselect or ungroup choose Uungroup Sheets when you right click on the selected sheets or select a non-grouped sheet.
11
Consolidating data
To consolidate several sets of data into one worksheet you need to combine them in a way that adds together the values in corresponding cells in the various sheets. Using linking formulas is one way to do this. The Paste Special command offers other options that make this possible. And you can consolidate based on position or by category. To consolidate data from several sheets by pasting select the sheet you are adding the data to (we will call it the new sheet) select the first sheet with data to consolidate, then highlight and copy the data select the new sheet and select the location to paste the data choose Home Tab, Paste, Paste Values; leave the range highlighted select the next sheet with data to consolidate, then highlight and copy the data select the new sheet and choose Paste, Paste Special select the Values paste option and the Add operation, and check the Skip blanks check box choose OK repeat the process to add further data ranges To consolidate data by category click the upper-left cell of the destination area for the consolidated data on the Data tab, click Consolidate in the Function box, select the summary function you want Excel to use eg SUM in the Reference box, enter a source range you want to consolidate. Make sure to include the data labels in the selection click Add repeat the above 2 steps for each source range you want to consolidate under Use labels in, select the check boxes that indicate where the labels are located in the source area: either the top row, the left column, or both to update the consolidation table automatically when the source data changes, select the Create links to source data check box To create links, the source and destination areas must be on different worksheets. Once you create links, you cannot add new source areas or change the source areas that are included in the consolidation. Note - Labels in a source area that do not match any labels in the other source areas result in separate rows or columns when you consolidate data. Note also - To consolidate by position, follow the above procedure but do not set the Use labels in check boxes.
12
Array formulas
An array formula can perform multiple calculations and then return either a single result or multiple results. Array formulas act on two or more sets of values known as array arguments. Each array argument must have the same number of rows and columns. You create array formulas the same way that you create basic, single-value formulas. Select the cell or cells that will contain the formula, create the formula, and then press Ctrl+Shift+Enter to enter the formula. To calculate multiple results with an array formula, you must enter the array into a range of cells that has the same number or rows and columns as the array arguments. Entering an array formula When entering an array formula, Excel automatically inserts the formula between braces { }. To enter an array formula select the cell or cells where you want to enter the formula (depending on whether you want one result or several) type the array formula in the usual manner eg =B3:B6*C3:C6 OR =SUM(B3:B6*C3:C6) press Ctrl+Shift+Enter Editing array formulas select any cell in the array range click in the formula bar; when in edit mode (i.e., the formula bar is active), the braces ( { } ) do not appear in the array formula edit the array formula in the usual manner press Ctrl+Shift+Enter
13
Formula Examples
A basic Mark Sheet
Assign 1 ID Lastname Firstname 40% 52 67 58 Assign Assign Assign 1 2 3 0.4 52 67 58 0.2 65 86 74 0.4 25 87 65 =SUM(D4*$D$3)+(E4*$E$3)+(F4* $F$3) =SUM(D5*$D$3)+(E5*$E$3)+(F5* $F$3) =SUM(D6*$D$3)+(E6*$E$3)+(F6* $F$3) =IF(G4>=84.5,"HD",IF(G4>=74.5,"DN",IF(G4>=64.5,"CR",IF(G4>=49 .5,"P","F")))) =IF(G5>=84.5,"HD",IF(G5>=74.5,"DN",IF(G5>=64.5,"CR",IF(G5>=49 .5,"P","F")))) =IF(G6>=84.5,"HD",IF(G6>=74.5,"DN",IF(G6>=64.5,"CR",IF(G6>=49 .5,"P","F")))) Total Assign 2 20% 65 86 74 Assign 3 40% 25 87 65 44 79 64 F DN P Grade Total Grade
14