excel ppt

195 views

Published on

excel

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
195
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

excel ppt

  1. 1. CS 105 Simple Functions What is a function? What is a function argument? Return value? What is a PMT function? What is a VLOOKUP function? CS 105 Spring 2011 #1
  2. 2. Functions • A function is a command that does a specific task • Example of a function in Excel: SUM(A2:B5) • This function sums all cells in the range A2:B5 – the answer is called the function’s return value • Why functions? Define once, use many times – simply change the stuff within parentheses – called the arguments of the function CS 105 Spring 2011 #2
  3. 3. Arguments • Arguments can be data, cells/ranges or even other functions • Some functions have a fixed number of arguments, others have a variable number of arguments • Examples: SQRT (9) fixed: 1 non-negative number SUM (A1:A10, C7) variable: numbers/cells/ranges CONCATENATE("CS", 105) variable: mixed – concatenation can also be done with & operator e.g. = B3 & C4 CS 105 Spring 2011 #3
  4. 4. Built-in functions • Excel comes pre-loaded with many useful functions • Categories include: – Math & Trig e.g. SQRT, ABS, COUNT, COUNTA,… – Statistical e.g. AVG – Financial e.g. PMT – Text e.g. CONCATENATE • Later, we will see how to write our own functions to extend Excel’s “toolkit” or “library” CS 105 Spring 2011 #4
  5. 5. PMT function • PMT function has three arguments: – interest rate per payment period – number of payments – amount of loan CS 105 Spring 2011 #5
  6. 6. PMT: things to remember • PMT return value is negative (to indicate that we owe the payment) e.g., ($100.00) – use –PMT(…) to get amount we pay • If the interest rate is annual and the payment is monthly, use monthly interest rate = (annual interest rate)/12 CS 105 Spring 2011 #6
  7. 7. Using Goal Seek Data Tab in Excel 2007 • I want to pay only $200 a month. What car can I afford? – Change payment total by changing one of the above variables – The top value must have a formula in it – Goal: $200 – Computer calculates the value of the car you can afford #7
  8. 8. VLOOKUP Function • Often, we want to assign a cell some value based on the value of another (related) cell • Usually, we have a table listing some values and their related values. For example: – A table listing the score in a class and the associated grade – A table listing words in English and the corresponding words in another language CS 105 Spring 2011 #8
  9. 9. More on VLOOKUP • Requires three arguments: – value (or cell) to look up – range of the table – the column number containing the value you want to return =VLOOKUP(value, range, answer col., [range lookup?]) CS 105 Spring 2011 #9
  10. 10. Another Example • AI2 holds the points we want to evaluate • Range = AL:AM holds the scale • We want data from the 2nd column CS 105 Spring 2011 # 10
  11. 11. Approximate Matching: Look for 170 VLOOKUP searches the AL column for the largest value less than or equal to 170, and returns the corresponding value from column AM. CS 105 Spring 2011 # 11
  12. 12. Multi-table Lookup • Suppose we want to lookup the match for something in one table, and then lookup the match for that in another table • Answer: Nested function calls CS 105 Spring 2011 # 12
  13. 13. Importing Data into Excel 1. You can import data and not have to retype it. 2. Excel can create spreadsheets from Word tables 3. You can import and export spreadsheets and databases CS 105 Spring 2011 # 13
  14. 14. Importing Data into Excel 2007 CS 105 Spring 2011 # 14
  15. 15. Importing Data into Excel 2007 CS 105 Spring 2011 # 15
  16. 16. To Summarize • What is a function? • What is a function argument? Return value? • What is a PMT function? • What is a VLOOKUP function? CS 105 Spring 2011 # 16

×