Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- MS EXCEL PPT PRESENTATION by Mridul Bansal 184725 views
- Tutorial 5: Excel Tables, PivotTabl... by cios135 10682 views
- Learn Mircosoft Excel 2010 Formulas... by NB Rulez 22062 views
- Excel 2010 formulas by manikandan1280 30786 views
- Data Mining with Excel 2010 and Pow... by Mark Tabladillo 14954 views
- Advanced Analytics: Excel Solver by Jen Underwood 4828 views

5,336 views

5,068 views

5,068 views

Published on

No Downloads

Total views

5,336

On SlideShare

0

From Embeds

0

Number of Embeds

1

Shares

0

Downloads

656

Comments

0

Likes

7

No embeds

No notes for slide

- 1. 1 TWO DAYS WORKSHOP ADVANCED EXCEL 2010 Facilitator: Ahmed Yasir Khan (MBA MIS, OCP, DIT, MCSE, MCTS, ITIL,PMP, Excel Expert) ERP Consultant & Corporate Trainer
- 2. 2
- 3. Course Facilitator Ahmed Yasir Khan is a qualified MBA (MIS) and has possesses 17 year of diversified industry exposure in the field of finance & IT. Currently he is working as Manager e-support in FBR. He is a member of Trainer FBR Trained Professional Govt. sector as well as Private organization. He has conducting in-house training also workshop and seminar. He has specialty in Import, Export, Supply Chain, E-Filling (IGM, Import, Export, Sales Tax Return), e-Support, Income Tax, Sales tax, Customs, ERP’s & Database (SAPR3, SAP B1 ,Microsoft Dynamics AX, Oracle e-business suite R12 ,Oracle11g, Tally ERP, Quick book2012, Peachtree2010, Advanced Excel2010/2013, Access 2010/13, SQL SERVER 2008R2/2012).Microsoft office Application Specialist, SharePoint 2010,PMP,ITIL V3, Corporate Finance, Analysis of Financial Statement, Strategic in Financial Management , Excel Dashboard Reporting, Financial Planning & Budgeting, Excel VBA Programming and Financial Modeling. As part from diversified development assignment . He has been actively involved in training and teaching Professional with many Institutions as visiting faculty member, and taught thousands of Professionals. He is a trainer of repute for his unique training style which enables maximum learning & retention in least possible time. 3
- 4. Rules of Workshop No Rules just Ethics 4
- 5. 5 Ratings of MS Excel (0-10) General understanding of Excel Name Lets Get Started
- 6. 6 Excel 2010 / 2013 Microsoft Excel 2010 / 2013 makes it possible to analyze, manage, and share information in more ways than ever before, helping you make better, smarter decisions. New analysis and visualization tools help you track and highlight important data trends. Easily access your important data on the go from almost any Web browser or smartphone.1 You can even upload your files to the Web and work simultaneously with others online. Whether you’re producing financial reports or managing personal expenses, Excel 2010 / 2013 gives you more efficiency and flexibility to accomplish your goals.
- 7. What’s new in Excel 2010/ 2013 ? Here’s a quick summary of what’s new, relative to Excel 2010: ● 64-bit version: If your hardware supports it, you can install the 64-bit version, which lets you create much larger workbooks. ● Sparkline charts: Create small, in-cell charts to summarize a range of data graphically. ● Pivot table Slicers: A new way to filter and display data in pivot tables. ● Pivot table formatting options: You have more control over the appearance of pivot table reports. ● File tab: The File tab replaces the Office button, which is located to the left of the other tabs. Clicking it displays Backstage View, a screen that lets you perform various operations on your workbook. This view essentially replaces the traditional File and Print menus — plus quite a bit more. ● Draft mode for charts: If you use many highly formatted charts, you can choose to display them in draft mode for improved performance. ● Conditional formatting enhancements: Data bar conditional formatting can display in a solid color, and the bars provide a more accurate display. ● Function enhancements: Many of Excel’s statistical functions have been improved in terms of numeric accuracy. The old versions of these functions are still available and have been relegated to a new function category called Compatibility. ● Image editing enhancements: You have much more control over the appearance of graphic images inserted into a workbook. ● Paste preview: When you copy a range, the Paste command displays various options (with preview). ● Ribbon customization: End users can customize the Ribbon by adding new tabs and groups. ● Equation editor: Create and display (non calculating) mathematical equations. ● Faster processing: Microsoft made some improvements to the calculation engine, and files load a bit faster. ● New security features: Workbooks downloaded from the Internet or from e-mail attachments are opened in Protected View mode. Workbooks can be designated as “trusted,” and they don’t need to reside in special trusted folders. ● Updated Solver: Excel 2010 includes a new version of the Solver add-in. ● Enhancements to VBA: Many operations that used to require old XLM macros can now be performed directly using VBA macro commands. 7
- 8. 8 Beyond column filters: slicers on tables Slicers were first introduced in Excel 2010 and made filtering PivotTables as simple as clicking a button. We’ve taken the goodness of slicers but moved it beyond just PivotTables - with Excel 2013 you can now create slicers on any table! And, as you’ll see in throughout this article, all of this works in a browser too using Excel Web App. Since Halloween is coming up soon, I’ve whipped up a small data set showing some great Horror novels to help you get into a spooky mood. When deciding which books you might want to read, you could use the existing filter drop downs on the table columns and peck your way through. For this example data set, since it is so small, that would probably work fine. But let’s see how much better the experience could be if we added some slicers. Here’s the starting table of data (brought to you via embedding this table with Excel Web App):
- 9. 9
- 10. 10 Insert Slicers Let’s get some slicers inserted! The first thing to do is to select the table (any cell in the table will do), and then click the Insert Slicers button from the Design tab of the Table Tools ribbon. Now you’ll get a dialog asking you which columns you want to create slicers for. Each slicer filters a single column of data and you can create slicers on any column you like. For this example, let’s go ahead and select the checkboxes for the following columns: Author, Rating, Type, and Made into Movie.
- 11. 11
- 12. 12 That will create the slicers and drop them in your workbook. Go ahead and drag them all next to the left side of the table. You’ll now have some basic slicers that you can use to filter the table.
- 13. 13 Go ahead and click the slicer buttons and watch your table filter – try finding books by your favorite author, by the type of monster you like, etc. Here’s a few things to note as you filter: •The table column filter buttons show the same “filtered state” as the slicers. That’s because under the covers they work the same way. So you can use the table drop down filters and the slicers together (this can be useful in more advanced filtering scenarios). •The slicer buttons themselves tell you about your data. For instance if you select Peter Straub from the authors slicer, you’ll see that while there is data in our list for lots of types of books, he only has books about Ghosts or Psychopath in our list, with ratings that are either 4 or 4.5, and some of his books have been made into movies.
- 14. 14
- 15. 15 The slicers are additive – that is you can keep applying more filters as you go. So if you click Ghosts on the Type slicer, then you’ll see there’s only 4.5 rated books written by Peter Straub about ghosts and it was made into a movie. And if you look at your table you’ll see the book shown there (it turns out there’s only one).
- 16. 16 •The slicer buttons update as you type new data into the table. Go ahead and change the rating from 4.5 to 5 and note that the slicers update in real time. •You can select multiple buttons via clicking and dragging, Shift + click, or Ctrl + click. •Slicers are “floating” objects in Excel – that means you can put them anywhere you want to deliver the best reporting experience. For instance, you may create a chart based off your table and just want to show the chart. No problem – add your slicers on the table columns you want, and then just put the slicers next to your chart. People don’t even need to see your table – as you use the slicers you’ll see your chart update in real time.
- 17. 17 Chart Styles in Office 2013 I have been working in the data visualization area for the last two releases and this is a feature I hold dear to my heart. In the latest release we worked with our amazing design team in Office to modify the default style for charts and create a variety of other styles which should make this task much easier. Of course the example used in the previous article was a customized chart so you won’t get that chart out of the box but you will have a clean nice looking chart to start with. Introducing the new default style When you insert a chart in Office 2013 you will see some noticeable differences.
- 18. 18 Office 2010 Default
- 19. 19 Office 2013 Default
- 20. 20 Overall I think this a vast improvement from the past and a basic chart in Office will look great without any additional effort on your part. Here are some of the changes we made and why: •Chart title is added by default. Most charts out there will have a title so it made sense to have one by default. •Legend is moved to the bottom for a column chart. This gives the actual chart more room and the legend is meant to be a reference vs. the center of attention. •There is no legend added for a single series chart. •All lines and text are toned down as to not draw too much attention away from the chart itself. •There is spacing between the series. We thought this was more aesthetically pleasing and we balanced this spacing with the spacing between categories so the grouping is still clear. You will also see that not every chart type will have the same exact defaults as we have optimized it for that
- 21. 21 Additional chart styles Now that you have a clean beautiful chart by default you could just go with that, but sometimes you really want to make an impact and do something a little different. We previously introduced the buttons that showed up when you select a chart in Chris’s article and the new chart styles are contained in the second button.
- 22. 22 Quick Analysis: Discover new insights As part of our planning work at the beginning of the Office 2013 project, we (the Excel team) participated in several customer visits. We went in small groups to someone’s work environment (whether that was a large corporation, a small business, or even a home office), watched them use Excel, and talked with them a bit about what they were doing. Of course several patterns and themes were observed, but here are a few that caught my interest and really resonated with me and with several others on the team: · Many people aren’t familiar with the variety of data analysis features that Excel has to offer · Many people are hesitant to create / insert new features, even a chart. Some people feared they wouldn’t be able to change it back if they didn’t like the result · Many people are simply unwilling to navigate away from the home tab to go looking for interesting features & capabilities These are the main motivations behind Excel 2013’s Quick Analysis feature. We set out to create a dynamic interface that allows fear-free exploration of Excel’s analytical capabilities. The Quick Analysis galleries are dynamic: what appears in them changes depending on the type of data you’ve selected. Live preview makes it quick and painless to see what’s going to happen to the workbook before committing to a change.
- 23. 23 Getting Started: Select a Range of Data The way to bring up the Quick Analysis interface is to select a range of data, and then click the little button that appears near the bottom right of the selection: Clicking the button brings up a gallery of options to explore:
- 24. 24 By default the Conditional Formatting gallery comes up, showing just a handful of choices, but there are other galleries to explore as well. The Charts, Totals, Tables, and Sparklines tabs in this callout each show a handful of choices from those respective categories to explore. Conditional Formatting Looking at my sample data, I might first be interested in taking a closer look just at the numbers, so I select G4:I20, and click the button. Hovering my mouse over the various icons in the gallery gives me a live preview of what choosing that option will do. Below are some examples with Data Bars and Color Scale. If you like what you see, click the button to add that to your selection, otherwise if you just move your mouse away the live preview will disappear.
- 25. 25
- 26. 26 Dynamic Conditional Formatting Gallery In the example above I’ve selected numbers, so it makes sense that I’m seeing Conditional Formatting options that work well with numeric values. If I select all Text or all Date values, the items in the Conditional Formatting gallery change to work better with those types of data:
- 27. 27 (Text values in the “Territory” column selected, showing a live preview of the “Text Contains” Conditional Formatting rule)
- 28. 28 Charts Now let’s say I want show my data as a chart, but I’m not yet sure exactly what I want. I’ll select the entire range of data from B3:I20 (Names column all the way to Sales 2011 column), and take a look at the CHARTS gallery in the Quick Analysis callout. This gallery is dynamic as well - - in the background Excel is doing some light weight analysis of the data in the selection to determine some good chart recommendations to get started. At first glance it seems that the Clustered Column chart is being recommended over and over again:
- 29. 29 Looking through the live previews though shows me that these are different Clustered Column PivotChart recommendations. The indicator that a PivotChart (instead of a regular chart) is being recommended is the little PivotTable icon in the upper right corner of the chart preview:
- 30. 30 Incidentally, the choices you see here are a subset of the recommendations you get when you navigate to the Insert ribbon tab and choose “Recommended Charts” (the maximum number of recommendations in the Quick Analysis gallery is 5, whereas clicking the ribbon button doesn’t limit the recommendations to 5). Also, if the recommendation engine has fewer than 5 recommended charts, then fewer recommendations will appear in the Quick Analysis Charts gallery.
- 31. 31 Totals To explore the Totals gallery in the Quick Analysis callout, let’s first select all the numbers for Sales 2009, 2010, and 2011 (range G4:I20). Looking at the icons in that gallery, I’m thinking that this part of the feature will put totals either at the bottom or to the right of my selection (OK, since I helped design those icons, I’ve got an unfair advantage J):
- 32. 32 This particular gallery has more choices, with right/left scrolling arrows to see the additional options. Hovering over the 2nd “Sum” button shows a live preview of the totals placed to the right instead of at the bottom:
- 33. 33 Tables Exploring the Tables gallery quickly shows me that this is the place to get recommendations about how to summarize my data in a PivotTable. This gallery is dynamic as well - - in the background, Excel is doing more lightweight analysis of the data in the selection to determine good recommendations to get started. Even if I don’t know what the word PivotTable means, I can see from the live previews that it’s putting subtotals into a nicely formatted layout:
- 34. 34 Again, just like recommended charts, this is a subset of the options you get when you navigate to the Insert ribbon tab and choose “Recommended PivotTables”. Also, if the recommendation engine has fewer than 5 recommendations, then fewer recommendations will appear in this gallery. As an extreme example, if the engine doesn’t recommend any PivotTables, there won’t be any recommendations in the gallery; only the option to insert a blank PivotTable. This can happen if your data contains only unique values, column-wise, since in that case there isn’t anything to consolidate and subtotal. I’m really excited that you don’t have to know the word “PivotTable” in order to get good summary information about your data, and you get live previews of a good number of options to choose from.
- 35. 35 Sparklines Finally, let’s take a quick glance at the Sparklines gallery. I’ll select the numbers again, and hover over the “Column” icon to see a live preview of where the Sparklines will be inserted, and get a better understanding of what Sparklines even means:
- 36. 36 Intro to Power View for Excel 2013 Power View is a new add-in for Excel 2013 that consumes the Data Model. For those who are avid readers of our blog, you will remember Diego did a post on the Data Model we’ve integrated into Excel. If you don’t remember that post (because not all of us are perfect), the gist is that there’s a new way to have lots of data in Excel and not slow it down while also having handy things like relationships (to make your handy dandy new in-workbook cube relational). Another thing to note is that the Power View add-in comes installed by default in Professional Plus versions of Office. The point of Power View is to make it very easy to create pretty, interactive data presentations (or “reports” as the experts call them) that will make your boss go “Wow, how did you do that? You’re a genius!” Well, OK, maybe not that far but you’ll definitely look super smart. Plus, it also can be used to explore your data visually without worrying about messing anything up and even make reports on your own, without IT help. Some of you may be quizzical and asking yourselves, “But… Doesn’t Excel already have graphs and charts and visualizations?” To which I would say, “Yes!!” and probably also add that with Power View, you get automatic cross-filtering of visualizations, new visualizations that aren’t in Excel (such as a "play" axis, maps, and cards), a free-form canvas that doesn't have the restriction of gridlines (no more messing up alignment because you inserted a new row!), unique filtering options (e.g. sliders), and support for images. Plus, if you’re a data head, you’ll be excited to know that Power View sheets in Excel can also be hooked up to external data models (i.e. Analysis Services Tabular Models).
- 37. 37 Insert a Power View sheet 1. Click on the “Insert” tab 2. In the middle of the ribbon, click on the “Power View” button in the Reports section (to the right of the Charts section) 3. If this is the first time you have used Power View, you’ll get a dialog asking you to enable the add-in. Go ahead and hit Enable so we can get started.
- 38. 38 If you hit cancel, you’ll have to go to step 1 and we’ll be here all day. 4. If you don’t have Silverlight installed, you’ll have to install it. Power View needs it to render all those pretty visualizations you’re going to make. Good thing we have this nice bar that comes up to give you a handy link: 5. After you’re done installing Silverlight, go ahead and hit the “Reload” button on the bar there. You should now get a blank Power View. Whoohoo! Your first Power View. I’m so proud!
- 39. 39 Add a Title First things first: titles. 1. On your Power View sheet, click in the title text box at the top of the sheet and type “Where to buy a house?” Titles are important, people! Don’t skip this part, it’s definitely essential to the whole shebang. Add a map Second things second: we are going to put the data on a map so we don’t have to stare at it in table form, scratching our heads, wondering where this “Ravenna” place is and whether it has views of Puget Sound. (hint: it doesn’t) 1. In the field list on the right side of the screen, from Table1, check the checkboxes next to LIST PRICE and IS SHORT SALE. You should now have a table on the Power View canvas. Voilà!
- 40. 40 Introduction to the Data Model and Relationships in Excel 2013 Finding a home Around this time last year my wife and I were considering purchasing a house in the Seattle area, even if it meant dealing with some of the worst traffic in the US. So like any self- respecting Excel nerd I started a spreadsheet with a table of data that fit our parameters. This data was easy to find on the many real-estate sites out there like Zillow.com or Redfin.com. One thing I noticed though was that none of the these sites by themselves had all the relevant data I wanted to make an informed decision and this is where the Data Model came into play by allowing me to combine data from multiple sources and perform a richer analysis.
- 41. 41
- 42. 42 My first look at the Data Model If you open the file above you will see I have a table with a lot of data. The first thing I am going to do is create a PivotTable so that I can sift through it easily. Under the INSERT tab, hit PivotTable and the following dialog should pop-up:
- 43. 43 “A Data Model is a new approach for integrating data from multiple tables, effectively building a relational data source inside the Excel workbook. Within Excel, Data Models are used transparently, providing data used in PivotTables, PivotCharts, and Power View reports“. In other words, the new Data Model allows for building a “model” where data from a lot of different sources can be combined by creating “relationships” between the data sources. For those of you with some database knowledge this is similar to creating joins between tables, except all the tables live in Excel. I chose to add this data to my Data Model because I am going to be combining it with data I will get from other sources to make my analysis more complete.
- 44. 44 Create the PivotTable The first thing I want to do is look at the number of houses I have selected by zip code. To do this I drag the ZIP field to ROWS and the LISTING ID field to VALUES. By default, this will give me a SUM of LISTING ID’s, but we want a COUNT. To do this, right click on the header that says SUM of LISTING ID -> Value Field Settings… and change to COUNT. As you can see, I only have to sift through 165 house listings now (L). I have decided to add a couple more fields to my PivotTable to help with my analysis. I added LIST PRICE, DAYS ON MARKET and SQFT and changed the Value Field Settings to AVERAGE. At this time my PivotTable looked something like this:
- 45. 45 Flash Fill Today I’m proud to be writing about a new feature in Excel 2013 called Flash Fill that makes all of those tasks very simple for even the most novice user. Several years ago, I wrote a blog post demonstrating how to do string manipulations like the above examples. The problem is that the solutions relied heavily on using formulas, which can feel quite complex and intimidating for people not as familiar with Excel. Now, with Flash Fill, you can do it all without formulas. In fact, it’s easier than that. Now you can do it all by providing a few examples. Here’s what Flash Fill looks like in action
- 46. 46 Let’s work through the examples in my original post, but using Flash Fill as the solution. I updated a few of the values from the original data set to make things more interesting, you can get it here. After pasting the data into Excel, you’ll need to split it out into separate columns. I used Text to Columns feature, using “comma” as the separator.
- 47. 47 Step 1: Format social security numbers like this: 123-45-6789 Insert a new column between SSN and Last Name and title it “SSN”. Notice below that as you start typing the formatted SSN, Excel will help you complete the column based on the value you entered in the prior row. 1.Make sure the inserted column is wide enough to display the formatted value (80 pixels should be enough; this isn’t required to use Flash Fill, but it looks better that way) 2.Type the first social security number in B2, with hyphens: 413-66-4341 3.Start typing the second SSN value: 2 At this point Flash Fill recognizes what you’re doing and makes additional suggestions:
- 48. 48 Now, if you’re paranoid like me, then at step 2. You won’t trust yourself to re-type the SSN correctly. Instead you can double click in A2 (goes into “cell edit mode”), copy the value, then double click cell B2 (back into “edit mode”), and paste the value. Then, before hitting ENTER to commit the value, put the cursor between the 3rd and 4th digit, and type the hyphen. Ditto for between the 5th and 6th character. Now hit enter, and continue to step 3.
- 49. Introducing the Ribbon By far, the biggest change when you upgrade from Excel 2003 to Excel 2010 is trying to ﬁnd commands on the ribbon. Rather than the familiar File, Edit, View, Insert, Format, Tools, Data, Window, Help menu bar, you are now presented with large icons and words such as File, Home, Insert, Page Layout, Formulas, Data, Review, and View. 49
- 50. Table 1.1 shows where you can ﬁnd most Excel 2003 menu commands in Excel2010. 2003 Menu 2010 Ribbon File File Edit Home View View Insert Home, Insert, Formula, Review Format Home Tools See Table 1.2 Data Data, Pivot Tables on Insert Window View Help Question mark on right; or File, Help Standard toolbar See Table 1.3 Formatting toolbar Home 50
- 51. Table 1.2 shows where you can ﬁnd the commands formerly found on the Tools menu. Excel 2003 Tools Menu Commands Excel 2010 Tab Spelling, Research, Share Workbook, Track Changes, Compare, Merge Review Error Checking and Formula Auditing Formulas Speech, Shared Workspace, and AutoCorrect Options Add to QAT Protection Home (Format drop-down) or Review Goal Seek and Scenarios Data (What-if drop-down) Macro View Add-Ins and Options File (Options) 51
- 52. Table 1.3 shows where you can ﬁnd the commands formerly found on the Standard toolbar.. Excel 2003 StandardToolbar Icons Excel 2010 Tab New, Open, Save, Print, Print Preview File Spelling & Thesaurus Review Cut, Copy, Paste, Format Painter Home Undo, Redo QAT Hyperlink Insert AutoSum, Sort Home Chart, Drawing Insert Zoom View (or bottom right) 52
- 53. Ribbon Components The ribbon is the new interface at the top of Excel 2010. It consists of icons and words grouped into several tabs. Within each tab, icons are further classiﬁed into groups. In Figure 1.1, there are 4 icons in the Clipboard group of the Home tab and 10 icons in the Font group Figure 1.1 - Icons are classiﬁed in logical groups within each ribbon tab. 53
- 54. Dialog Box Launchers In the lower-right corner of some groups, you will see a tiny icon showing a diagonal arrow. You can see this in the lower-right corner of Figure 1.1. This icon is a dialog box launcher. Click the icon to open a dialog box similar to the dialogs you are familiar with from Excel 2003. Figure 1.2 - The mouse pointer is showing the dialog box launcher in the Font group of the Home tab. Dialog launchers are found in many groups. 54
- 55. Icons That Really Contain a Drop-Down A lot of large icons look like a single icon until you hover over the icon. You will then see that the top half of the icon is a Paste icon, for example, and the bottom half of the icon is a drop-down with more choices related to the icon. Figure 1.3 - The Paste icon is really an icon and a drop-down. 55
- 56. Unlocking the Big Grid Excel 2010 offers more rows and columns than Excel 2003. That is an understatement. Excel 97-2003 Excel 2010 % Change Rows 65,536 1,048,576 1,500% Columns 256 16,384 25,500% Cells 16.7 Million 17.2 Billion 102,300% In case you are wondering how Microsoft comes up with numbers such as 16,384 and 1,048,576, these are powers of 2. There are 2^20 rows and 2^14 columns. In Excel 2003, you could not have daily dates for 1 year stretching across the columns. In the new version, you can show weekdays for 46 years before you run into the last column (XFD). 56
- 57. Unlocking the Big Grid Other Limits in Excel 2010 Item Old Limit New Limit PC memory Excel can use 1GB Max allowed by Windows Number of unique colors in a single workbook 56 4.3 billion Number of conditional format conditions on a cell 3 Limited by avail- able memory Number of levels of sorting 3 64 Number of items in the AutoFilter drop-down 1,000 10,000 Number of characters that can display in one cell 1,024 32,768 Number of characters in a cell that Excel can print 1,024 32,768 Number of unique cell styles in a workbook 4,096 65,536 Maximum length of formulas 1,024 characters 8,192 characters Number of levels of nesting in formulas 7 64 Maximum number of arguments in a function 30 255 Number of characters that can be displayed 255 32K in a cell for- matted as text Number of items that can be found with Find All 65,536 ~2 billion 57
- 58. Unlocking the Big Grid Other Limits in Excel 2010 Item Old Limit New Limit Number of columns allowed in a pivot table 255 16,384 Number of unique items in a single pivot field 32,768 ~1 million 58 Formulas Definition of a formula: Anything in a cell when the first character is an equal sign. (The long version: anything in a cell or formula textbox when the first character is an equal sign and the cell is not preformatted as Text.) Advantages of a formula: You are telling Excel to do calculations, look into another cell, create text strings, or deliver a range
- 59. 59 Formulas How to create a formula: Type “=,” followed by: 1. Equal sign (starts all formulas) 2. Cell references (also defined names, sheet references, workbook references) 3. Math operators (plus, subtract, multiply, and so on) 4. Numbers (if the number will not change; for example, 12 months, 24 hours) 5. Built-in functions (AVERAGE, SUM, COUNTIF, DOLLAR, PMT, and so forth) 6. Comparative operators (=, >, >=, <, <=, <>) 7. The ampersand join symbol (&) (Shift + 7) 8. Text within quotation marks (for example, “For the Month Ended”) 9. Array constants (for example, {1,2,3}) How to enter a formula into a cell: hit one of the following: 10. ENTER (Active Cell goes down) 11. Ctrl + Enter (Active Cell remains the same) 12. Tab(Active Cell goes left) 13. Shift + Tab (Active Cell goes right) 14. Shift + Enter(Active Cell goes up)
- 60. 60 Entering and Editing Formulas Entering a new formula into a worksheet appears to be a straightforward process: 1. Select the cell in which you want to enter the formula. 2. Type an equal sign (=) to tell Excel that you’re entering a formula. 3. Type the formula’s operands and operators. 4. Press Enter to confirm the formula. Using Arithmetic Formulas Arithmetic formulas are by far the most common type of formula. These formulas combine numbers, cell addresses, and function results with mathematical operators to perform calculations.
- 61. 61
- 62. 62 Using Comparison Formulas A comparison formula is a statement that compares two or more numbers, text strings, cell contents, or function results. If the statement is true, the result of the formula is given the logical value TRUE, which is equivalent to any nonzero value. If the statement is false, the formula returns the logical value FALSE, which is equivalent to zero.
- 63. 63 The Order of Precedence
- 64. 64 Cell References When we copy formulas that contain cell references to other cells, then we need to understand that there are four types of cell references: 1. Relative 2. Absolute 3. “Mixed Cell Reference with Column Locked” also known as “Column Absolute, Row Relative” 4. “Mixed Cell Reference with Row Locked” also known as “Row Absolute, Column Relative”
- 65. 65
- 66. 66 Functions Functions What are functions? Built in code that will do complicated math (and other tasks) for you after you tell it which cells to look in Examples: SUM function (adds) AVERAGE function (arithmetic mean) PMT function (calculate loan payment) COUNT function (counts numeric values) COUNTA function (counts non-blank cells) COUNTIF function (counts based on a condition) ROUND function (round a number to a specified digit) IF function (Puts one of two items into cell depending on whether the condition evaluates to true or false)
- 67. Tables Make Excel a Bit More Like a Database Many spreadsheets in Excel contain a two-dimensional table of data. You have headings in the ﬁrst row, and each row of the worksheet represents a different record in a table. Because a common task in Excel is dealing with tables, Excel 2010 has added several features for working with tables. One of the best beneﬁts of the table functionality is that charts and pivot tables based on a table will automatically grow with the table. 67
- 68. Tables Make Excel a Bit More Like a Database To turn on the features, select a single cell in the dataset and press Ctrl+T. Excel will assume your table extends to either the edge of the spreadsheet or to a blank row and blank column. The Create Table dialog will ask you to conﬁrm the range for the table. Excel guesses the current region as the address for the table 68
- 69. Tables Make Excel a Bit More Like a Database When you apply a table, you will notice the following features: Excel applies a default table formatting. You can change to another style using the Table Styles gallery on the Table Tools Design tab. 69
- 70. 70 Filter table data by using slicers First introduced in Excel 2010 as an interactive way to filter PivotTable data, slicers can now also filter data in Excel tables, query tables, and other data tables. Simpler to set up and use, slicers show the current filter so you’ll know exactly what data you’re looking at.
- 71. Sort by Color Do you ever use color to mark problem ells? 71
- 72. Sort by Color . 1. From the Data tab, click the Sort icon. 2. In the Sort dialog, change the Sort On drop-down from Values to Cell 3. A drop-down appears in the Order column. Choose the appropriate color from the drop-down. 72
- 73. Sort by Color 4. If you want an additional color to appear after the ﬁrst color, click Copy Level. Repeat steps 2, 3 for each additional color. 73
- 74. Add Subtotals Automatically Subtotals are not a new feature. They’ve been around since Excel 97. However, if you have never used them, they will seem miraculous to you. Even if you have used the Subtotal command, read through this chapter, as there are some tricks available after you have subtotaled the worksheet 1. The data should be sorted by customer. Select a single cell in the Customer column. On the Data tab, click the AZ sort button. Excel sorts the data by customer. 74
- 75. Add Subtotals Automatically 2. On the Data tab, click the Subtotal icon. 3. The Subtotal dialog always assumes that you want to subtotal by the leftmost ﬁeld and that the subtotal will be applied to the rightmost ﬁeld. Change Region to Customer, ensure the function is the Sum function, and add checkmarks to Quantity, Revenue, and COGS. If you want each customer on a new page, click Page Break Between Groups. 4. Click the OK button. Excel quickly inserts new rows at every change in cu 75
- 76. Add Subtotals Automatically 5. Notice that to the left of column A, you have new buttons labeled 1,2, and 3. These are group and outline buttons added automatically by the Subtotal command. Click the 2 button to see a summary of the customer totals If you press the 1 button, you will see just the grand total. If you press the 3 button, you will see all the detail rows again. 76
- 77. Add Subtotals Automatically Removing Subtotals To remove automatic subtotals, select one cell in the dataset. Click the Subtotal button in the Data tab. In the Subtotal dialog, click the Remove All button. 77
- 78. Copying Only the Subtotal Rows a natural reaction is to copy the subtotal rows and paste them to a new worksheet. Unfortunately, this also brings along the detail rows. It is easy to copy only the subtotal rows, yet it is an incredibly obscure trick: 1. Add subtotals to a dataset and collapse the dataset using the 2 group and Outline button. 2. Select from the ﬁnal grand total row up to the ﬁrst heading. 3. Press Alt+; (that is, hold down the Alt key while pressing the semicolon). 4. Click Ctrl+C to copy. You will see that Excel is selecting just the visible rows. You can now paste to another worksheet. The key step is the Alt+; to select only the visible rows. Alt+; is the shortcut key that replaces Home, Find & Select, Go to Special, Visible Cells Only, OK. The Go To Special dialog is a powerful dialog. the Go To Special dialog. This dialog is useful for selecting only the blanks, or only the errors, or only the formulas in a selection. 78
- 79. Copying Only the Subtotal Rows There are many useful options in the Go To Special dialog. Find it by selecting Home, Find & Select, Go To Special 79
- 80. Formatting the Subtotal Rows The ability to select only the visible cells within a selection allows you to format the subtotal rows. you want the customer totals to be in green. Follow these steps: 1. Add subtotals by customer. 2. Click the 2 Group and Outline button to see the customer totals. 3. Select from the last customer total row up to the ﬁrst customer subtotal row. 4. Press Alt+; to select the visible cells within the selection. 5. From the Home tab, choose Cell Styles, Accent 3, 40%. 6. Click the 3 group and Outline button. You will see that each subtotal row has been formatted. 80
- 81. 81
- 82. Pivot Tables A pivot table report enables you to analyze and summarize a million rows of data in Excel 2010 without entering a single formula. Pivot tables are incredibly ﬂexible, and you can create hundreds of different styles of reports. Creating a Pivot Table Start with a transactional dataset. You should have unique headings in the ﬁrst row, and then no blank rows or blank columns in the data. For best results, keep your numeric columns ﬁlled with numeric data and replace any blank cells with a 0. A typical dataset will look like 82
- 83. Pivot Tables Select one cell in the dataset. From the Insert tab, choose the top half of the PivotTable icon. Excel will predict that your data includes the current region around your selected cell. Make sure this is okay, and then click OK. In Excel 2010, pivot tables are built in the PivotTable Field List. A blank pivot table appears in cell A3, and the PivotTable Field List appears on your screen. 83
- 84. Pivot Tables Initially, a blank pivot table has no ﬁelds. 84
- 85. Pivot Tables Excel uses the ﬁeld types to determine where to display the ﬁelds. 85
- 86. Filtering or Sorting Data in a Pivot Table Initially, values in a pivot table will be sorted in ascending sequence. Click the Row Labels drop-down in cell A4 to access a menu. Choose Customer from the Select Field drop-down. 86
- 87. Filtering or Sorting Data in a Pivot Table 87
- 88. Grouping Daily Dates into Months or Years the pivot table shows daily dates in the Row Labels area. Select one of the cells with a date and choose Group Field from the PivotTable Tools Options tab. 88
- 89. Grouping Daily Dates into Months or Years Never group a ﬁeld only by month. Always include Months and Years in the Grouping dialog. (Otherwise, Excel will add January of 2011 and January of 2010 into a single value called January!) The result is a summary by month and year. Excel replaces the daily dates with monthly dates. 89
- 90. Grouping Daily Dates into Months or Years Grouping the Date ﬁeld actually adds a new virtual ﬁeld to the PivotTable Field List. Move Years from Row Labels to Column Labels to produce a report showing year-to- year comparisons. 90
- 91. More Pivot Table Tricks select any cell with Revenue. In the Options tab, choose the Show Values As drop-down and choose % of Column Total. The report will change to show % of Total. The percentages will total to 100% down the column. 91
- 92. More Pivot Table Tricks New in Excel 2010, the Show Values As drop-down offers a setting for % of Parent Row. When you have two ﬁelds in the row area, you can use this setting to show nested totals. 92
- 93. Creating a Report for Every Month Drag a ﬁeld such as Date to the Report Filter section of the PivotTable Field List. You now have a drop-down in cell B1 where you can choose to ﬁlter the report to a particular month. Create a report with one ﬁeld in the Filter area. 93
- 94. Creating a Report for Every Month After you have a ﬁeld in the Report Filter section, you can quickly replicate the report for every value in the ﬁlter ﬁeld. Follow these steps: 1. Add at least one ﬁeld to the ﬁlter area of the report. 2. On the PivotTable Tools Options tab, look for the Options icon on the left side of the tab. Do not press the Options button, but click the drop-down arrow to the right of the button. 3. From the drop-down, choose Show Report Filter Pages. 4. Choose to Show All Report Filter Pages of Date and click OK. Excel quickly adds new worksheets for each value in the Date drop-down. 94
- 95. Creating Visual Filters with Slicers Report ﬁlters picked up a new trick in Excel 2007, although the trick was half- baked. When a ﬁeld was in the report ﬁlter, you could choose Select Multiple Items, and then select two or more items New in Excel 2007, choose multiple items. 95
- 96. Creating Visual Filters with Slicers However, the problem was that the report heading in cell B1 would then show the completely bafﬂing (Multiple Items). If you printed this report, no one would have any idea which multiple items were selected. I now see that the Excel 2007 feature was only a stepping stone on the way to the Excel 2010 slicer feature. Slicers are visual ﬁlters. From the PivotTable Tools Options tab, choose Insert Slicers. You can choose multiple ﬁelds to serve as slicers from the Insert Slicers dialog. Select ﬁelds for the slicers. 96
- 97. Creating Visual Filters with Slicers Excel 2010 then tiles the slicers in the middle of the screen. Every slicer has one column. It is a unimaginative presentation of the slicers. For a cool presentation Excel stacks the slicers in the middle of the screen. 97
- 98. Creating Visual Filters with Slicers Rearrange the slicers around your pivot table. Use the Slicer Tools tab to change the color of each slicer and the number of columns in each slicer. Slicers with many values make great tall vertical slicers. Slicers with short values can handle multiple columns and ﬁt well above the pivot table. The slicers provide a visual ﬁlter. You can instantly see which items are included and not included. To select multiple items from the slicer, you can either hold down the Ctrl key or click and drag to select multiple adjacent items. 98
- 99. Controlling Multiple Pivot Tables with One Set of Slicers Suppose you have created one pivot table and have insert slicers for that pivot table. If you want to have those slicers ﬁlter a second pivot table, it is easy to do. Deﬁne the second pivot table and place it on the same worksheet as the ﬁrst pivot table. With the cell pointer in the second pivot table, open the Insert Slicer drop-down and choose Slicer Connections. For additional pivot tables, manage the slicer connections. 99
- 100. Controlling Multiple Pivot Tables with One Set of Slicers Excel will show you the Slicer Connections dialog. You can connect any or all existing slicers to the new pivot table Connect the existing slicers to the new pivot table. four slicers are ﬁltering two different pivot tables. This would have been hard to do in earlier versions of Excel. You needed a macro to have one set of report ﬁlters drive multiple pivot tables. 100
- 101. Charting The Excel 2003 charting engine looked tired and old. Little had changed in 15 years in charting. The charting engine in Ofﬁce 2007 was completely rewritten. The charting engine in Ofﬁce 2010 is the same as in Excel 2007, with most of the 1,500 bugs wiped out. Excel, Word, and PowerPoint all share the same charting engine. The process of creating a chart is streamlined, although you might have to look further to make changes to the default chart. Creating a Chart in Excel 2010 Creating a chart involves four broad steps: 1. Prepare your data. Make sure that you have headings above and to the left of the data to be charted. If one of the headings has date or numeric ﬁelds, leave the top- left corner cell blank. Select the range of data to be charted. 101
- 102. Charting 102
- 103. Charting Adding New Data to a Chart Suppose you have produced a series of charts last month and now you need to update all of those charts to reﬂect a new month of data. Follow these steps: 1. Open the workbook from last month. Enter the new month’s data adjacent to the old month in the workbook. 2. Click the plot area of the chart. You will see a blue rectangle appear around the range of data currently plotted on the chart. Notice that there are blue square handles in each corner of the range. 103
- 104. Charting Drag the handle to the right to include the new October data. 104
- 105. 105 Conditional & Logical Functions Excel has a number of logical functions which allow you to set various “conditions” and have data respond to them. For example, you may only want a certain calculation performed or piece of text displayed if certain conditions are met. The functions used to produce this type of analysis are found in the Insert, Function menu, under the heading LOGICAL.
- 106. 106 If Statements The IF function is used to analyse data, test whether or not it meets certain conditions and then act upon its decision. The formula can be entered either by typing it or by using the Function Library on the formula’s ribbon, the section that deals with logical functions Typically, the IF statement is accompanied by three arguments enclosed in one set of parentheses; the condition to be met (logical_test); the action to be performed if that condition is true (value_if_true); the action to be performed if false (value_if_false). Each of these is separated by a comma, as shown; =IF ( logical_test, value_if_true, value_if_false)
- 107. 107 Logical Test This part of the IF statement is the “condition”, or test. You may want to test to see if a cell is a certain value, or to compare two cells. In these cases, symbols called LOGICAL OPERATORS are useful;
- 108. 108 Value If True / False Provided that you remember that TRUE value always precedes FALSE value, these two values can be almost anything. If desired, a simple number could be returned, a calculation performed, or even a piece of text entered. Also, the type of data entered can vary depending on whether it is a true or false result. You may want a calculation if the logical test is true, but a message displayed if false. (Remember that text to be included in functions should be enclosed in quotes). Taking the same logical test mentioned above, if the sales figure meets or exceeds the target, a BONUS is calculated (e.g. 2% of sales). If not, no bonus is calculated so a value of zero is returned. The IF statement in column D of the example reads as follows; =IF(B2>=C2,B2*2%,0)
- 109. 109 You may, alternatively, want to see a message saying “NO BONUS”. In this case, the true value will remain the same and the false value will be the text string “NO BONUS”; =IF(B2>=C2,B2*2%,”NO BONUS”) A particularly common use of IF statements is to produce “ratings” or “comments” on figures in a spreadsheet. For this, both the true and false values are text strings. For example, if a sales figure exceeds a certain amount, a rating of “GOOD” is returned, otherwise the rating is “POOR”; =IF(B2>1000,”GOOD”,”POOR”) Nested If When you need to have more than one condition and more than two possible outcomes, a NESTED IF is required. This is based on the same principle as a normal IF statement, but involves “nesting” a secondary formula inside the main one. The secondary IF forms the FALSE part of the main statement, as follows; =IF(1st logic test , 1st true value , IF(2nd logic test , 2nd true value , false value))
- 110. 110 Only if both logic tests are found to be false will the false value be returned. Notice that there are two sets of parentheses, as there are two separate IF statements. This process can be enlarged to include more conditions and more eventualities - up to seven IF’s can be nested within the main statement. However, care must be taken to ensure that the correct number of parentheses are added. In the example, sales staff could now receive one of three possible ratings; =IF(B2>1000,”GOOD”,IF(B2<600,”POOR”,”AVERAGE”)) To make the above IF statement more flexible, the logical tests could be amended to measure sales against cell references instead of figures. In the example, column E has been used to hold the upper and lower sales thresholds. =IF(B2>$E$2,”GOOD”,IF(B2<$E$3,”POOR”,”AVERAGE”)) (If the IF statement is to be copied later, this cell reference should be absolute).
- 111. 111 SUMIF You can use this function to say to Excel, “Only total the numbers in the Total column where the entry in the Customer column is Viking Supplies”. The syntax of the SUMIF() function is detailed below: =SUMIF(range,criteria,sum_range) RANGE is the range of cells you want to test. CRITERIA. It is the criteria in the form of a number, expression, or text that defines which cells will be added. For example, criteria can be expressed as 32, “32”, “>32”, “apples”. SUM RANGE. These are the actual cells to sum. The cells in sum range are summed only if their corresponding cells in range match the criteria. If sum range is omitted, the cells in range are summed.
- 112. 112 =SUMIF(B2:B11, “Viking Supplies”, F2:F11)
- 113. 113 With the example above, the SUMIF function that you would use to generate the VIKING SUPPLIES TOTAL would look as above. Using the INSERT FUNCTION tool the dialog would look like this and show any errors in entering the values or ranges
- 114. 114 SUMIFS This function adds all the cells in a range that meets multiple criteria. The order of arguments is different between SUMIFS and SUMIF. In particular, the SUM_RANGE argument is the first argument in SUMIFS, but it is the third argument in SUMIF. If you are copying and editing these similar functions, make sure you put the arguments in the correct order. SUMIFS(sum_range,criteria_range1,criteria1,criteria_range2,criteria2…) • SUM_RANGEis one or more cells to sum, including numbers or names, arrays, or references that contain numbers. Blank and text values are ignored. • CRITERIA_RANGE1, CRITERIA_RANGE2,are 1 to 127 ranges in which to evaluate the associated criteria. • CRITERIA1, CRITERIA2, …are 1 to 127 criteria in the form of a number, expression, cell reference, or text that define which cells will be added. For example, criteria can be expressed as 32, “32”, “>32”, “apples”, or B4.
- 115. 115 Some important points about SUMIFS • Each cell in SUM_RANGE is summed only if all of the corresponding criteria specified are true for that cell. • Cells in SUM_RANGE that contain TRUE evaluate as 1; cells in SUM_RANGE that contain FALSE evaluate as 0 (zero). • Unlike the range and criteria arguments in the SUMIF function, in SUMIFS each CRITERIA_RANGE must be the same size and shape as SUM_RANGE. • You can use the wildcard characters, question mark (?) and asterisk (*), in criteria. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
- 116. 116
- 117. 117 And, Or, Not Rather than create large and unwieldy formulae involving multiple IF statements, the AND, OR and NOT functions can be used to group logical tests or “conditions” together. These three functions can be used on their own, but in that case they will only return the values “TRUE” or “FALSE”. As these two values are not particularly meaningful on a spreadsheet, it is much more useful to combine the AND, OR and NOT functions within an IF statement. This way, you can ask for calculations to be performed or other text messages to appear as a result. And This function is a logical test to see if all conditions are true. If this is the case, the value “TRUE” is returned. If any of the arguments in the AND statement are found to be false, the whole statement produces the value “FALSE”. This function is particularly useful as a check to make sure that all conditions you set are met.
- 118. 118 Arguments are entered in the AND statement in parentheses, separated by commas, and there is a maximum of 30 arguments to one AND statement. The following example checks that two cells, B1 and B2, are both greater than 100. =AND(B1>100,B2>100) If either one of these two cells contains a value less than a hundred, the result of the AND statement is “FALSE.” This can now be wrapped inside an IF function to produce a more meaningful result. You may want to add the two figures together if they are over 100, or display a message indicating that they are not high enough. =IF(AND(B1>100,B2>100),B1+B2,”Figures not high enough”)
- 119. 119 Another application of AND’s is to check that a number is between certain limits. The following example checks that a number is between 50 and 100. If it is, the value is entered. If not, a message is displayed; =IF(AND(B1>50,B1<100),B1,”Number is out of range”) OR This function is a logical test to see if one or more conditions are true. If this is the case, the value “TRUE” is returned. If just one of the arguments in the OR statement is found to be true, the whole statement produces the value “TRUE”. Only when all arguments are false will the value “FALSE” be returned. This function is particularly useful as a check to make sure that at least one of the conditions you set is met. =IF(OR(B1>100,B2>100),”at least one is OK”,”Figures not high enough”) In the above formula, only one of the numbers in cells B1 and B2 has to be over 100 in order for them to be added together. The message only appears if neither figure is high enough.
- 120. 120 NOT NOT checks to see if the argument is false. If so, the value “TRUE” is returned. It is best to use NOT as a “provided this is not the case” function. In other words, so long as the argument is false, the overall statement is true. In the example, the cell contents of B1 are returned unless the number 13 is encountered. If B1 is found to contain 13, the message “Unlucky!” is displayed; =IF(NOT(B1=13),B1,”Unlucky!”) The NOT function can only contain one argument. If it is necessary to check that more than one argument is false, the OR function should be used and the true and false values of the IF statement reversed. Suppose, for example, a check is done against the numbers 13 and 666; =IF(OR(B1=13,B1=666),”Unlucky!”,B1)
- 121. 121
- 122. 122 Lookup Functions As already mentioned, Excel can produce varying results in a cell, depending on conditions set by you. For example, if numbers are above or below certain limits, different calculations will be performed and text messages displayed. The usual method for constructing this sort of analysis is using the IF function. However, as already demonstrated, this can become large and unwieldy when you want multiple conditions and many possible outcomes. To begin with, Excel can only nest seven IF clauses in a main IF statement, whereas you may want more than eight logical tests or “scenarios.” To achieve this, Excel provides some LOOKUP functions. These functions allow you to create formulae which examine large amounts of data and find information which matches or approximates to certain conditions. They are simpler to construct than nested IF’s and can produce many more varied results.
- 123. 123 Lookup Before you actually start to use the various LOOKUP functions, it is worth learning the terms that you will come across, what they mean and the syntax of the function arguments. Vector Lookup A vector is a series of data that only occupies one row or column. LOOKUP will look through this row or column to find a specific value. When the value is found, a corresponding “result” in the adjacent row or column is returned. For example, column D of a spreadsheet may contain figures, and the adjacent column E contains corresponding text. LOOKUP will search for the requested figure in column D and return the corresponding text from column E. The syntax for LOOKUP is as follows; =LOOKUP( lookup_value , lookup_vector , result_vector )
- 124. 124 The LOOKUP_VALUE represents the number or text entry to look for; the LOOKUP_VECTOR is the area in which to search for the LOOKUP_VALUE; the RESULT_VECTOR is the adjacent row or column where the corresponding value or text is to be found.
- 125. 125 In the diagram, column D contains varying salaries, against which there is a company car in column E which corresponds to each salary. For example, a £20,030 salary gets a GOLF, a £35,000 salary gets a SCORPIO. A LOOKUP formula can be used to return whatever car is appropriate to a salary figure that is entered. In this case, the LOOKUP_VALUe is the cell where the salary is entered (B13), the LOOKUP_VECTOR is the salary column (D3:D11), and the RESULT_VECTOR is the car column (E3:E11). Hence the formula;
- 126. 126 In the diagram, column D contains varying salaries, against which there is a company car in column E which corresponds to each salary. For example, a £20,030 salary gets a GOLF, a £35,000 salary gets a SCORPIO. A LOOKUP formula can be used to return whatever car is appropriate to a salary figure that is entered. In this case, the LOOKUP_VALUe is the cell where the salary is entered (B13), the LOOKUP_VECTOR is the salary column (D3:D11), and the RESULT_VECTOR is the car column (E3:E11). Hence the formula;
- 127. 127
- 128. 128 HLOOKUP The horizontal LOOKUP function (HLOOKUP) can be used not just on a “VECTOR” (single column or row of data), but on an “array” (multiple rows and columns). HLOOKUP searches for a specified value horizontally along the top row of an array. When the value is found, HLOOKUP searches down to a specified row and enters the value of the cell. This is useful when data is arranged in a large tabular format, and it would be difficult for you to read across columns and then down to the appropriate cell. HLOOKUP will do this automatically. The syntax for HLOOKUP is; =HLOOKUP( lookup_value , table_array , row_index_number) The LOOKUP_VALUE is, as before, a number, text string or cell reference which is the value to be found along the top row of the data; the TABLE_ARRAY is the cell references (or range name) of the entire table of data; the ROW_INDEX_ NUMBER represents the row from which the result is required. This must be a number, e.g. 4 instructs HLOOKUP to extract a value from row 4 of the TABLE_ARRAY. It is important to remember that data in the array must be in ascending order. With a simple LOOKUP function, only one column or row of data, referred to as a vector, is required. HLOOKUP uses an array (i.e. more than one column or row of data). Therefore, as HLOOKUP searches horizontally (i.e. across the array), data in the first row must be in ascending order, i.e. numbers from lowest to highest, text from A to Z. As with LOOKUP, if this rule is ignored, HLOOKUP will return the wrong value.
- 129. 129 As an example, a user may have a spreadsheet which displays various different rates of interest for a range of amounts over different time periods; Whatever the amount a customer wants to borrow, he may pay up to five different rates of interest depending on whether the loan is over 10, 15 or more years. The HLOOKUP function will find a specific amount, then move down the array to find the appropriate interest rate for the required time period. Designate cell A51 as the cell to hold the amount, i.e. the LOOKUP_VALUE; cells C43:H48 are the TABLE_ARRAY; the ROW_INDEX_NUMBER will be 2 if a customer wants the loan over 10 years, 3 if he wants the loan over 15 years, and so on. Cell B51 holds this formula; =HLOOKUP(A51,C43:H48,3)
- 130. 130 The above formula looks along the top row of the array for the value in cell A51 (30000). It then moves down to row 3 and returns the value 15.00%, which is the correct interest rate for a £30000 loan over 15 years. (Range names could be used here to simplify the formula). As with the LOOKUP function, the advantage of HLOOKUP is that it does not necessarily have to find the exact LOOKUP_VALUE. If, for example, you wanted to find out what interest rate is applicable to a £28000 loan, the figure 28000 can be entered in the LOOKUP_VALUE cell (A51) and the rate 14.30% appears. As before, Excel has looked for the value in the array closest to, but lower than, the LOOKUP_VALUE.
- 131. 131 VLOOKUP The VLOOKUP function works on the same principle as HLOOKUP, but instead of searching horizontally, VLOOKUP searches vertically. VLOOKUP searches for a specified value vertically down the first column of an array. When the value is found, VLOOKUP searches across to a specified column and enters the value of the cell. The syntax for the VLOOKUP function follows the same pattern as HLOOKUP, except that instead of specifying a row index number, you would specify a column index number to instruct VLOOKUP to move across to a specific column in the array where the required value is to be found. =VLOOKUP( lookup_value , table_array , col_index_number ) In the case of VLOOKUP, data in the first column of the array should be in ascending order, as VLOOKUP searches down this column for the LOOKUP_VALUE. In the same spreadsheet, a VLOOKUP formula could be used to search for a specific time period, then return the appropriate rate for a fixed amount. In the following example, a time period is entered in cell A54 and in B54 the VLOOKUP formula is contained
- 132. 132
- 133. 133 Cell B54 holds this formula; =VLOOKUP(A54,C43:H48,5) The cell A54 is the LOOKUP_VALUE (time period), the TABLE_ARRAY is as before, and for this example rates are looked up for a loan of £40000, hence the COLUMN_INDEX_NUMBER5. By changing the value of cell A54, the appropriate rate for that time period is returned. Where the specific lookup_value is not found, VLOOKUP works in the same way as HLOOKUP. In other words, the nearest value in the array that is less than the LOOKUP_VALUE will be returned. So, a £40000 loan over 17 years would return an interest rate of 16.00%.
- 134. 134 Advanced Lookup Operations The basic lookup procedure—looking up a value in a column or row and then returning an offset value—will satisfy most of your needs. However, a few operations require a more sophisticated approach. The rest of this chapter examines these more advanced lookups, most of which make use of two more lookup functions: MATCH() and INDEX(). The MATCH() and INDEX() Functions The MATCH() function looks through a row or column of cells for a value. If MATCH() finds a match, it returns the relative position of the match in the row or column. Here’s the syntax: MATCH(lookup_value, lookup_array[, match_type]) lookup_value The value you want to find. You can use a number, string, reference, or logical value. lookup_array The row or column of cells you want to use for the lookup. match_type How you want Excel to match the lookup_value with the entries in the lookup_array. You have three choices: 0 Finds the first value that exactly matches lookup_value. The lookup_array can be in any order. 1 Finds the largest value that’s less than or equal to lookup_value which is the default value. The lookup_array must be in ascending order. –1 Finds the smallest value that is greater than or equal to lookup_ value. The lookup_array must be in descending order.
- 135. 135 reference A reference to one or more cell ranges. row_num The number of the row in reference from which to return a value. You can omit row_num if reference is a single row. column_num The number of the column in reference from which to return a value. You can omit column_num if reference is a single column. area_num If you entered more than one range for reference, area_num is the range you want to use. The first range you entered is 1, which is the default, the second is 2, and so on. The idea is that you use MATCH() to get row_num or column_num depending on how your table is laid out, and then use INDEX() to return the value you need. To give you the flavor of using these two functions, let’s duplicate your earlier effort of looking up a customer name, given the account number.
- 136. 136
- 137. 137 In particular, notice the new formula in cell B4: =INDEX(D3:E15, MATCH(B2, D3:D15, 0), 2) The MATCH() function looks up the value in cell B2 in the range D3:D15. That value is then used as the row_num argument for the INDEX() function. That value is 1 in the example, so the INDEX() function reduces to this: =INDEX(D3:E15, 1, 2) This returns the value in the first row and the second column of the range D3:E15.
- 138. 138 Looking Up a Value Using Worksheet List Boxes If you use a worksheet list box or combo box the linked cell contains the number of the selected item, not the item itself. Figure 9.8 shows a worksheet with a list box and a drop-down list. The list used by both controls is the range A3:A10. Notice that the linked cells (E3 and E10) display the number of the list selection, not the selection itself. To get the selected list item, you can use the INDEX() function with the following modified syntax: INDEX(list_range, list_selection) list_range The range used in the list box or drop-down list list_selection The number of the item selected in the list
- 139. 139 Financial Function Building Loan Formulas Excel is loaded with financial features that give you powerful tools for building worksheets that man- age both business and personal finances. You can use these functions to calculate such things as the monthly payment on a loan, the future value of an annuity, the internal rate of return of an investment, or the yearly depreciation of an asset. The final three chapters of this book cover these and many other uses for Excel’s financial formulas. Understanding the Time Value of Money The time value of money means that a dollar in hand now is worth more than a dollar promised at some future date.
- 140. 140 These two factors—interest and risk—are at the heart of most financial formulas and mod- els. More realistically, these factors really mean that you’re mostly comparing the benefits of investing a dollar now versus getting a dollar in the future plus some risk premium—an amount that compensates for the risk you’re taking in waiting for the dollar to be delivered. You compare these by looking at the present value (the amount something is worth now) and the future value (the amount something is worth in the future). They’re related as follows: A. Future value = Present value + Interest Present value = Future value – discount Calculating the Loan Payment When negotiating a loan to purchase equipment or a mortgage for your house, the first concern that comes up is almost always the size of the payment you’ll need to make each period. This is just basic cash-flow management because the monthly (or whatever) pay- ment must fit within your budget.
- 141. 141 To return the periodic payment for a loan, use the PMT() function: PMT(rate, nper, pv[, fv][, type]) rate The fixed rate of interest over the term of the loan. nper The number of payments over the term of the loan. pv The loan principal. fv The future value of the loan. type The type of payment. Use 0 (the default) for end-of-period payments; use 1 for begin- ning-of-period payments. For example, the following formula returns the monthly payment of a $10,000 loan with an annual interest rate of 6% (0.5% per month) over 5 years (60 months): =PMT(0.005, 60, 10000)
- 142. 142 Building a Loan Amortization Schedule A loan amortization schedule is a table that shows a sequence of calculations over the life of a loan. For each period, the schedule shows figures such as the payment, the principal and interest components of the payment, the cumulative principal and interest, and the remaining principal. The next few sections take you through various amortization schedules designed for different scenarios.
- 143. 143 Building a Dynamic Amortization Schedule The problem with the amortization schedule in Figure 18.6 is that it’s static. It works well if you change the interest rate or the principal, but it doesn’t handle other types of changes very well: Q If you want to use a different time basis—for example, monthly instead of annual— you need to edit the initial formulas for payment, principal, interest, cumulative principal, and cumulative interest, and then refill the schedule. Q If you want to use a different number of periods, you need to either extend the schedule (for a longer term) or shorten the schedule and delete the extraneous periods (for a shorter term). Both operations are tedious and time consuming enough that they greatly reduce the value of the amortization schedule. To make the schedule truly useful, you need to reconfigure it so that the schedule formulas and the schedule itself adjust automatically to any change in the time basis or the length of the term.
- 144. 144 Here’s a summary of the changes I made to create this schedule’s dynamic behavior: Q To change the time basis, select a value—Annual, Semiannual, Quarterly, or Monthly— in the Time Basis drop-down list. These values come from the text literals in the range F3:F6. The number of the selected list item is stored in cell E2.
- 145. 145 Q The time basis determines the time factor, the amount by which you have to adjust therate and the term. For example, if the time basis is Monthly, the time factor is 12. This means that you divide the annual interest rate (B2) by 12, and you multiply the term (B3) by 12. These new values are stored in the Adjusted Rate (D4) and Total Periods (D5) cells. The Time Factor cell (D3) uses the following formula: =CHOOSE(E2, 1, 2, 4, 12) Q Given the adjusted rate (D4) and the total periods (D5), the schedule formulas can reference these cells directly and always return the correct value for any selected time basis. For example, here’s the expression that calculates the payment: PMT(D4, D5, B4, B5, B6) Q The schedule adjusts its size automatically, depending on the Total Periods value (D5). If Total Periods is 15, the schedule contains 15 rows (not including the headers); if Total Periods is 180, the schedule contains 180 rows. Q Dynamically adjusting the size of the schedule is a function of the Total Periods value (D5). The first period (A10) is always 1; each subsequent period checks the previous value to see if it’s less than Total Periods. Here’s the formula in cell A11: =IF(A10 < D5, A10 + 1, “”)
- 146. 146 Calculating the Term of the Loan In some loan scenarios, you need to borrow a certain amount at the current interest rates, but you can spend only so much on each payment. If the other loan factors are fixed, the only way to adjust the payment is to adjust the term of the loan NPER() function, which returns the number of periods of a loan: NPER(rate, pmt, pv[, fv][, type]) rate The fixed rate of interest over the term of the loan. pmt The periodic payment. pv The loan principal. fv The future value of the loan (the default is 0). type The type of payment. Use 0 (the default) for end-of-period payments; use 1 for begin- ning-of-period payments.
- 147. 147 For example, suppose that you want to borrow $10,000 at 6 percent interest with no bal- loon payment, and the most you can spend is $750 per month. What term should you get? Figure 18.8 shows a worksheet that uses NPER() to calculate the answer: 13.8 months. Here are some things to note about this model: Q The interest rate is an annual value, so the NPER() function’s rate argument divides the rate by 12. Q The payment is already a monthly number, so no adjustment is necessary for the pmt attribute. Q The payment is negative because it’s money that you pay to the lender.
- 148. 148
- 149. Working with 3D Ranges A 3D range is a range selected on multiple worksheets. This is a powerful concept because it means that you can select a range on two or more sheets and then enter data, apply format- ting, or give a command, and the operation will affect all the ranges simultaneously. This proves useful when you’re working with a multi sheet model where some or all the labels are the same on each sheet. For example, in a workbook of expense calculations where each sheet details the expenses from a different division or department, you might want the label “Expenses” to appear in cell A1 on each sheet. To create a 3D range, first you need to group the worksheets you want to work with. To select multiple sheets, use any of the following techniques: Q To select adjacent sheets, click the tab of the first sheet, hold down the Shift key, and click the tab of the last sheet. Q To select nonadjacent sheets, hold down the Ctrl key and click the tab of each sheet you want to include in the group. Q To select all the sheets in a workbook, right-click any sheet tab and click the Select All Sheets command. 149
- 150. 150
- 151. 151 Using INDIRECT to Build and Evaluate Cell References On-the-Fly The INDIRECT function is deceivingly powerful. Consider this trivial example: In Cell A1, enter the text B2. In Cell B2, enter a number. In cell C3, enter the formula, =INDIRECT(A1). Excel will return the number that you entered in cell B2 in cell C3. The INDIRECT function looks in cell A1 and expects to find something that is a valid cell or range reference. It then looks in that address to return the answer for the function. The reference text can be any text that you can string together using various text functions. This allows you to create complex references that dynamically point to other sheets or to other open workbooks. The reference text can also be a range name. You could have a validation list box where someone selects a value from a list. If you have predefined a named range that corresponds to each possible entry on the list, INDIRECT can point to the various named ranges on-the-fly. When you use traditional formulas, even absolute formulas, there is a chance that someone might insert rows or columns that will move the reference. If you need a formula to always point to Cell J10, no matter how someone rearranges the worksheet, you can use =INDIRECT(“J10”) to handle this.
- 152. 152
- 153. Selecting a Range Using Go To For very large ranges, Excel’s Go To command comes in handy. You normally use the Go To command to jump to a specific cell address or range name. The following steps show you how to exploit this power to select a range: 1. Select the upper-left cell of the range. 2. Select Home, Find & Select, Go To (or press either F5 or Ctrl+G). The Go To dialog box appears 3. Use the Reference text box to enter the cell address of the lower-right corner of the range. 153
- 154. 4. Hold down the Shift key and click OK. Excel selects the range. Using the Go To Special Dialog Box You normally select cells according to their position within a worksheet. However, Excel includes a powerful feature that enables you to select cells according to their contents or other special properties. If you select Home, Find & Select, Go To Special (or click the Special button in the Go To dialog box) 154
- 155. Selecting Cells by Type The Go To Special dialog box contains many options, but only four of them enable you to select cells according to the type of contents they contain. Table 1.1 summarizes these four options. (The next few sections discuss the other Go To Special options.) 155
- 156. Data Entry in a Range If you know in advance which range you’ll use for data entry, you can save yourself some time and keystrokes by selecting the range before you begin. As you enter your data in each cell, use the keys listed in Table 1.3 to navigate the range. 156
- 157. Transposing Rows and Columns If you have row data that you’d prefer to see in columns or vice versa, you can use the Transpose command to transpose the data. Follow these steps: 1. Select and copy the source cells. 2. Select the upper-left corner of the destination range. 3. Select Home, pull down the Paste menu, and select Transpose. If you already have the Paste Special dialog box open, select the Transpose check box, and then click OK. Excel transposes the source range Copied range Transposed destination range 157
- 158. Formula Limits in Excel 2007 and Excel 2010 It’s a good idea to know the limits Excel sets on various aspects of formulas and worksheet models, even though it’s unlikely that you’ll ever bump up against these limits. Formula limits that were expanded in Excel 2007 remain the same in Excel 2010. Therefore, if you’re coming to Excel 2010 from Excel 2003 or earlier, Table 3.1 shows you the updated limits. 158
- 159. Creating Advanced Formulas Excel is a versatile program with many uses, from acting as a checkbook to a flat-file database- management system, to an equation solver, to a glorified calculator. However, for most business users, Excel’s forte is building models that enable them to quantify particular aspects of the business. The skeleton of the business model is made up of the chunks of data entered, imported, or copied into the worksheets. But the lifeblood of the model and the animating force behind it is the collection of formulas that summarizes data, answers questions, and makes predictions. Working with Arrays When you work with a range of cells, it might appear as though you’re working with a single thing. However, in reality Excel treats the range as a number of discrete units. 159
- 160. An array is a group of cells or values that Excel treats as a unit. For example, in a range con- figured as an array, Excel no longer treats the cells individually. Instead, it works with all the cells at once, which enables you to do things like apply a formula to every cell in the range using just a single operation. 160
- 161. Applying Data-Validation Rules to Cells It’s an unfortunate fact of spreadsheet life that your formulas are only as good as the data they’re given. It’s the GIGO effect, as the programmers say: garbage in, garbage out. In worksheet terms, garbage in means entering erroneous or improper data into a formula’s input cells. For basic data errors such as entering the wrong date or transposing a number’s digits, there’s not a lot you can do other than exhorting yourself or the people who use your worksheets to enter data carefully. Fortunately, you have a bit more control when it comes to preventing improper data entry. By improper 161
- 162. 162
- 163. Understanding Excel’s Error Values When you enter or edit a formula or change one of the formula’s input values, Excel might show an error value as the formula result. Excel has seven different error values: #DIV/0!, #N/A, #NAME?, #NULL!, #NUM!, #REF!, and #VALUE!. The next few sections give you a detailed look at these values and offer suggestions for solving them. #DIV/0! The #DIV/0! error almost always means that the cell’s formula is trying to divide by zero, a mathematical no-no. The cause is usually a reference to a cell that either is blank or contains the value 0. Check the cell’s precedents, which are the cells directly or indirectly referenced in the formula, to look for possible culprits. You’ll also see #DIV/0! if you enter an inappropriate argument in some functions. MOD(), for example, returns #DIV/0! if the second argument is 0. 163
- 164. #N/A The #N/A error value is short for not available, which means that the formula couldn’t return a legitimate result. You usually see #N/A when you use an inappropriate argument or if you omit a required argument in a function. HLOOKUP() and VLOOKUP(), for example, return #N/A if the lookup value is smaller than the first value in the lookup range. #NAME? The #NAME? error is displayed when Excel doesn’t recognize a name you used in a formula. This error also appears when Excel interprets text within the formula as an undefined name. This means the #NAME? error pops up in a wide variety of circumstances: Q You spelled a range name incorrectly. Q You used a range name that you haven’t yet defined. Q You spelled a function name incorrectly. Q You used a function that’s part of an uninstalled add-in. Q You used a string value without surrounding it with quotation marks. Q You entered a range reference and accidentally omitted the colon. Q You entered a reference to a range on another worksheet and didn’t enclose the sheet name in single quotation marks. 164
- 165. #NULL! Excel displays the #NULL! error in a very specific case: when you use the intersection opera- tor, which is a space, on two ranges that have no cells in common. For example, the ranges A1:B2 and C3:D4 have no common cells, so the following formula returns the #NULL! error: =SUM(A1:B2 C3:D4) #NUM! The #NUM! error means there’s a problem with a number in your formula. This almost always means that you entered an invalid argument in a math or trig function. For example, you entered a negative number as the argument for the SQRT() or LOG() function. Check the formula’s input cells—particularly those cells used as arguments for mathematical func- tions—to make sure the values are appropriate 165
- 166. #REF! The #REF! error means that your formula contains an invalid cell reference, which is usually caused by one of the following actions: You deleted a cell to which the formula refers. You need to add the cell back in or adjust the formula reference. You cut a cell and then pasted it in a cell used by the formula. You need to undo the cut and paste the cell elsewhere. 166
- 167. Loading the Analysis ToolPak Excel’s Analysis ToolPak is a large collection of powerful statistical tools. Some of these tools use advanced statistical techniques and were designed with only a limited number of technical users in mind. However, many of them have general applications and can be amazingly useful. The following procedure takes you through the steps: 1. Select File, Options to open the Excel Options dialog box. 2. Click Add-Ins. 3. In the Manage list, click Excel Add-ins and then click Go. Excel displays the Add-Ins dialog box. 4. Select the Analysis ToolPak check box, 5. Select OK. 6. If Excel tells you that the feature isn’t installed, click Yes to install it. 167
- 168. 168 WORKING WITH NAMES Most intermediate and advanced Excel users are familiar with the concept of named cells or ranges. Naming cells and ranges is an excellent practice and offers several important advantages. As you'll see in this chapter, Excel supports other types of names-and the power of this concept may surprise you. What's in a Name? You can think of a name as an identifier for something in a workbook. This "something" can consist of a cell, a range, a chart, a shape, and so on. If you provide a name for a range, you can then use that name in your formulas. For example, suppose your worksheet contains daily sales information stored in the range B2:B200. Further, assume that cell C1 contains a sales commission rate. The following formula returns the sum of the sales, multiplied by the commission rate: =SUM(B2:B200)*C1 This formula works fine, but its purpose is not at all clear. To help clarify the formula, you can define one descriptive name for the daily sales range and another descriptive name for cell C1. Assume, for this example, that the range B2:B200 is named DailySales and cell C1 is named CommissionRate. You can then rewrite the formula to use the names instead of the actual range addresses: =SUM(DailySales)*CommissionRate
- 169. 169 Names make your formulas more understandable and easier to use, especially for people who didn't create the worksheet. Obviously, a formula such as =Income–Taxes is more intuitive than =D20–D40. When entering formulas, a descriptive range name (such as Total_Income) is easier to remember than a cell address (such as AC21). And typing a name is less likely to result in an error than entering a cell or range address. You can quickly move to areas of your worksheet either by using the Name box, located at the left side of the formula bar (click the arrow for a drop-down list of defined names) or by choosing Home Editing Find & Select Go To (or F5) and specifying the range name. When you select a named cell or range, its name appears in the Name box. This is a good way to verify that your names refer to the correct cells. You may find that creating formulas is easier if you use named cells. You can easily insert a name into a formula by using the Formulas Defined Names Use in Formula command. Macros are easier to create and maintain when you use range names rather than cell addresses.
- 170. 170 A Name's Scope Before I get into creating and working with names, it's important to understand that all names have a scope. A name's scope defines where you can use the name. Names are scoped either at the workbook level or at the worksheet level for a particular sheet. Referencing Names You can refer to a workbook level name just by using its name from any sheet in the workbook. For worksheet level names, you must precede the name with the name of the worksheet unless you're using it on its own worksheet. For example, assume you have a workbook with two sheets, Sheet1 and Sheet2. In this workbook, you have Total_Sales (a workbook level name), North_Sales (a worksheet level name on Sheet1), and South_Sales (a worksheet level name on Sheet2). On Sheet1 or Sheet2, you can refer to Total_Sales by simply using the name: =Total_Sales If you're on Sheet1 and you want to refer to North_Sales, you can use a similar formula because North_Sales is defined on Sheet1: =North_Sales
- 171. 171 The Name Manager Now that you understand the concept of scope, you can start creating and using names. Excel 2007 & 2010 provides a new way for maintaining names called the Name Manager
- 172. 172 Creating Names Using the Name Box A faster way to create a name for a cell or range uses the Name box. The Name box is the drop-down list box to the left of the formula bar. Select the cell or range to name, click the Name box, type the name, and then press Enter to create the name. If a name already exists, you can't use the Name box to change the range to which that name refers. Attempting to do so simply selects the original range. You must use the Name Manager dialog box to change the reference for a name. Caution When you type a name in the Name box, you must press Enter to actually record the name. If you type a name and then click in the worksheet, Excel won't create the name.
- 173. 173
- 174. 174 Creating Names Automatically You may have a worksheet containing text that you want to use for names of adjacent cells or ranges. In this case, you might want to use the text in column A to create names for the corresponding values in column B. Excel makes this very easy to do. To create names by using adjacent text, start by selecting the name text and the cells that you want to name. (These can consist of individual cells or ranges of cells.) The names must be adjacent to the cells that you're naming. (A multiple selection is allowed.) Then choose Formulas Defined Names Create from Selection (or Ctrl+Shift+F3). Excel displays the Create Names From Selection dialog box
- 175. 175
- 176. 176
- 177. 177 Goal Seeking And Solving Excel has a number of ways of altering conditions on the spreadsheet and making formulae produce whatever result is requested. Excel can also forecast what conditions on the spreadsheet would be needed to optimise the result of a formula. For instance, there may be a profits figure that needs to be kept as high as possible, a costs figure that needs to be kept to a minimum, or a budget constraint that has to equal a certain figure exactly. Usually, these figures are formulae that depend on a great many other variables on the spreadsheet. Therefore, you would have to do an awful lot of trial-and-error analysis to obtain the desired result. Excel can, however, perform this analysis very quickly to obtain optimum results. The Goal Seek command can be used to make a formula achieve a certain value by altering just one variable. The Solver can be used for more painstaking analysis where many variables could be adjusted to reach a desired result. The Solver can be used to not only obtain a specific value, but also to maximise or minimise the result of a formula (e.g. maximise profits or minimise costs).
- 178. 178
- 179. 179 Goal Seek The Goal Seek command is used to bring one formula to a specific value. It does this by changing one of the cells that is referenced by the formula. Goal Seek asks for a cell reference that contains a formula (the Set cell). It also asks for a value, which is the figure you want the cell to equal. Finally, Goal Seek asks for a cell to alter in order to take the Set cell to the required value. In the example spreadsheet, cell B8 contains a formula that sums advertising and payroll costs. Cell B10 contains a profits formula based on the revenue figure, minus the total costs. A user may want to see how a profit of 4000 can be achieved by altering payroll costs.
- 180. 180 3. In the TO VALUE box, type the result you want. (In the example, this is -4000.) 4. In the BY CHANGING CELL box, enter the reference for the cell that contains the value you want to adjust. (In the example, this is cell B3.) The Goal Seek command automatically suggests the active cell as the Set cell. This can be overtyped with a new cell reference or you may click on the appropriate cell on the spreadsheet. 5. Click the OK button and the spreadsheet will alter the cell to a value sufficient for the formula to reach your goal. Goal Seek also informs you that the goal was achieved; 6. You now have the choice of accepting the revised spreadsheet, or returning to the previous values. Click OK to keep the changes, or CANCEL to restore previous values. 1. On the DATA ribbon, DATA TOOLS group, click WHAT-IF ANALYSIS and then click GOAL SEEK. 2. In the SET CELL box, enter the reference for the cell that contains the formula result you wish to set to a specific figure. (In the example, this is cell B10.)
- 181. 181 Solver For more complex trial-and-error analysis the Excel Solver should be used. Unlike Goal Seek, the Solver can alter a formula not just to produce a set value, but also to maximise or minimise the result. Solver has changed markedly in 2010 from previous versions but works in very much the same way. More than one changing cell can be specified, so as to increase the number of possibilities, and constraints can be built in to restrict the analysis to operate only under specific conditions. The basis for using the Solver is usually to alter many figures to produce the optimum result for a single formula. This could mean, for example, altering price figures to maximise profits. It could mean adjusting expenditure to minimise costs, etc. Whatever the case, the variable figures to be adjusted must have an influence, either, directly or indirectly, on the overall result, that is to say the changing cells must affect the formula to be optimised. Up to 200 changing cells can be included in the solving process, and up to 100 constraints can be built in to limit the Solver’s results.
- 182. 182
- 183. 183 Solver Parameters The Solver needs quite a lot of information in order for it to be able to come up with a realistic solution. These are the Solver parameters To set up the Solver: Mouse 1. Click the SOLVER button on the DATA Ribbon; in the ANALYSIS Group 2. If SOLVER is not visible it will be needed to be added into excel from the EXCELOPTIONS dialog in the FILE ribbon (go to ADDINS then choose EXCEL ADDINS) Like Goal Seek, the Set Cell is the cell containing the formula whose value is to be optimised. Unlike Goal Seek, however, the formula can be maximised or minimised as well as set to a specific value. 3. Decide which cells the Solver should alter in order to produce the Set Cell result. You can either type or click on the appropriate cells, and [CTRL] click if non-adjacent cell references are required.
- 184. 184 Constraints Constraints prevent the Solver from coming up with unrealistic solutions. To build constraints into your Solver parameters: Mouse
- 185. 185 1. In the SOLVER dialog, choose ADD 2. A dialog box appears and asks you to choose a cell whose value will be kept within certain limits. It can be any cell or cells on the spreadsheet (simply type the reference or select the range). 3. This cell can be subjected to an upper or lower limit, made to equal a specific value or forced to be a whole number. Drop down the arrow in the centre of the ADD CONSTRAINT box to see the list of choices:- To set an upper limit, click on the <= symbol; for a lower limit, >=; the = sign for a specific value and the INToption for an integer (whole number). 4. Once the OK button is chosen, theSOLVER PARAMETERS dialog box displays and the constraint appears in the window at the middle, left. These constraint can be amended using the CHANGE button, or removed using the DELETE button.
- 186. 186 When maximising or minimising a formula value, it is important to include constraints which set upper or lower limits on the changing values. For instance, when maximising profits by changing sales figures, the Solver could conceivably increase sales to infinity. If the sales figures are not limited by an upper constraint, the Solver will return an error message stating that the cell values do not converge. Similarly, minimising total costs could be achieved by making one of the contributing costs infinitely less than zero. A constraint should be included, therefore, to set a minimum level on these values.
- 187. 187 The example here shows the number of cases for five London hospitals, split into three types: ELECTIVE, EMERGENCY and DAY cases. Below this are the respective costs of each type of case for each hospital, and finally the total costs (number multiplied by price) for each type in each hospital. All these figures are totaled in column H, to arrive at a final total costs figure in cell H17.
- 188. 188
- 189. 189 Call up SOLVER from the ANALYSIS group on the DATA ribbon. The Set Cell in this case will be H17, the total costs cell. It can be assumed that the costs of cases cannot be changed, only the number in each hospital, therefore the changing cells will be B4:F6: The problem is that, if Solve is chosen now, the number of cases could reduce to infinitely below zero and produce an error message. Fortunately, constraints can be built in to force each hospital to have a minimum number of cases, and for there to be a total number of cases overall. Choose the ADD option to add a constraint, highlight the cells B4:F6, drop down the arrow and click on >= to set a minimum limit. Here, type whatever the minimum number of cases should be. To avoid the error message, simply type 1 and choose ADD. Also, as hospital cases cannot be fractions, add another constraint to force these cells to be integers. Finally, a constraint could be added to set a total number of cases (cell H7). The Solver parameters should now appear as follows: When Solve is chosen, the Solver carries out its analysis and finds a solution. This may be unsatisfactory, as it has calculated that the best way to minimise costs is to put the majority of cases in St George’s as day patients. Further constraints could now be added to force the Solver to place minimum numbers of cases in the other hospitals, or set a maximum limit on St Georges’ day cases.
- 190. 190 Advanced Solver Features Save Or Load A Problem Model Mouse 1. In the SOLVER PARAMETERS dialog box, click LOAD/SAVE. 2. Enter a cell range for the model area, and click either SAVE or LOAD. 3. When you save a model, enter the reference for the first cell of a vertical range of empty cells in which you want to place the problem model. When you load a model, enter the reference for the entire range of cells that contains the problem model.

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment