520 likes | 623 Vues
Day 6: Excel Chapter 2. Tazin Afrin Tazin.Afrin@mail.wvu.edu September 05, 2013. Objectives. Cell reference Basic functions Logical, lookup and financial functions PMT function Range Names Import text data Import xml data. Cell reference. 3 types : Relative reference
E N D
Day 6:Excel Chapter 2 Tazin AfrinTazin.Afrin@mail.wvu.edu September 05, 2013
Objectives • Cell reference • Basic functions • Logical, lookup and financial functions • PMT function • Range Names • Import text data • Import xml data
Cell reference • 3 types : • Relative reference • Absolute reference • Mixed reference
Relative Cell reference • Indicates a cell’s relative location from the cell containing the formula • such as two rows up and one column to the left • The cell reference changes when the formula is copied • maintain the same relative distance from the copied formula cell • Example, =A8-B8
Relative Cell reference Relative cell reference Selected cell
Relative Cell reference Relative cell reference Selected cell
Relative Cell reference • Why this happen ? • Because you copy the formula down the column to cell C12 • the column letters in the formula stay the same, but the row numbers change, down one row number at a time.
Absolute Cell reference • Indicates a cell’s specific location • provides a permanent reference to a specific cell • the cell reference does not change when you copy the formula • Regardless of where you copy the formula • Appears with a dollar sign before both the column letter and row number, such as $B$5.
Absolute Cell reference Absolute cell reference Selected cell
Absolute Cell reference Formulas referring to this cell should contain an absolute reference
Absolute Cell reference • For B8 = A8*$B$5 • A8 is relative reference, changes as you copy the formula to C9 • *$B$5 is absolute reference, does not change to B6
Mixed Cell reference • Contains both an absolute and a relative cell reference in a formula • combines an absolute cell reference with a relative cell reference • The absolute part does not change but the relative part does when you copy the formula. • either the column letter or the row number
Mixed Cell reference • Example – • $B5 or B$5 is a mixed cell reference • $B5, the column B is absolute, and the row number is relative; when you copy the formula, the column letter, B, does not change, but the row number will change. • B$5, the column letter, B, changes, but the row number, 5, does not change.
Mixed Cell reference Mixed cell reference Selected cell
Mixed Cell reference • Because you are copying down the same column, only the row reference 5 must be absolute; the column letter stays the same
Shortcut keys • The F4 key toggles through relative, absolute, and mixed references. Click a cell reference within a formula on the Formula Bar, and then press F4 to change it. • For example, click in B5 in the formula =A8*B5. Press F4, and the relative cell reference (B5) changes to an absolute cell reference ($B$5). • Press F4 again, and $B$5 becomes a mixed reference (B$5); • press F4 again, and it becomes another mixed reference ($B5). • Press F4 a fourth time, and the cell reference returns to the original relative reference (B5).
Function screen tip • Function ScreenTip, a small pop-up description that displays the function’s arguments
Function dialog box Input Values Function result Definition
Logical Function • The IF function evaluates a condition and returns one value if the condition is true and a different value if the condition is false. • =IF(logical_test,value_if_true,value_if_false) • The logical test is an expression that evaluates to true or false. • result is either true or false
PMT Function Loan Monthly Payment Price Buy A Car Down Payment Terms of loan Interest Rate Decision
PMT Function • The PMT function calculates the periodic payment for a loan with a fixed interest rate and fixed term. • =PMT(rate,nper,pv,[fv],[type])
PMT Function • =PMT(rate,nper,pv,[fv],[type]) • The rate is the periodic interest rate, such as a monthly interest rate. • The nper is the number of total payment periods. • The pv is the present value of the loan.
Range names • Range names make it easier to specify ranges in formulas and find ranges within large spreadsheets • Must begin with a letter or underscore • Only letters, numbers, underscores, and periods • You can reference the range in formulas with the name instead of using absolute references
Range names • Grades - Acceptable range name • COL - Acceptable abbreviation for cost-of-living • Tax_Rate - Acceptable name with underscore • Commission Rate - Unacceptable name; can’t use spaces in names • Discount Rate % - Unacceptable name; can’t use special symbols and spaces • 2009_Rate - Unacceptable name; can’t start with a number • Rate_2012 - Acceptable name with underscore and numbers
Managing range names • Name Box • Name Manager Tool • Formulas->Name Manager • Can add, edit, or delete ranges names • Use in Formula • Paste Names as documentation • Find name for formula • Autocomplete will show range names, double click the name to fill it in
Day 6:Excel Chapter 3 Tazin AfrinTazin.Afrin@mail.wvu.edu September 05, 2013
Importing text • A text file is a data file that contains letters, numbers, and symbols only. • A delimiter is a character used to separate data in a text file. • A tab-delimited file is a text file that uses tabs to separate data.
Importing text • Data->From Text • Delimited/Fixed Width • Delimiters • Formatting
Text manipulation • Convert Text to Columns • Data->Text to Columns • Just like importing text files • CONCATENATE() • Combines text
Changing Case • PROPER() • Also known as title case • First letter of each word capitalized • UPPER() • LOWER()
SUBSTITUTE • SUBSTITUTE(text, old text, new text, n) • text: the text you want to make the substitution to • old text: the text you want to remove • new text: the text you want to replace old text with • n: which occurrence to change • If n is not specified, all text matching old text will be replaced with new text
Other text functions • TRIM() • Removes leading and trailing spaces • LEFT(text, n) • Returns the leftmost n characters of text • RIGHT(text, n) • Returns the rightmost n characters of text • MID(text, start, n) • Returns n characters of text, starting with the character in the position specified by start
XML Today’s world Industry DATA School Software University Hardware College Corporate offices
xml • eXtensible Markup Language • Each piece of data has a tag that specifies what it represents • A tag is like a label • HTML is a specific form of XML with limited tags (<h1>header</h1>, <b>bold</b>, etc.) • XML can have any tag
XML syntax • Element • Start tag, end tag, and data • Tags • Tags use angled brackets <> • End tags must have the same name as the start tag, but are prefixed with a / • <example>data</example> • Tags are case sensitive so you can’t end an <example> with </Example> • Comments <!-- comment tags do not need an end tag -->
XML Import • Data Ribbon->From Other Sources->From XML Data Import
Custom XML imports • File->Open->Select XML File • Choose “Use the XML Source task pane” • Drag elements to the desired cells • Right click on the XML area, XML->Import and select the XML file again • Excel will import the data in the format you laid out
Attendance • Record from the classroom Computers • Otherwise it will show FRAUD.