excel functions and formulas

Click here to load reader

Upload: jason-wong

Post on 08-Feb-2017

542 views

Category:

Education


0 download

TRANSCRIPT

Excel Functions and formulas

ByJason WongEmail : [email protected] : +6012-273-6143Excel Functions and formulasWednesday, July 27, 2011

Jason wong1 - The BasicsWednesday, July 27, 2011Excel Functions and FormulasFormula BasicsUse Cell ReferencesCopy Formula Without Changing Cell ReferencesTranspose a FormulaCopy And Paste ValuesPerform a Quick CalculationNesting Functions

Jason wong2 - statistical and logical functionsWednesday, July 27, 2011Excel Functions and FormulasUse COUNTIF To Calculate Survey ResultsUse SUMIF To Add Data That Satisfy ConditionUse AVERAGEA To Include All CasesUse IF Function To Prevent Division By ZeroUse ISERROR Function To Avoid Error DisplayCreate Multiple Conditions Using Nested IF

Jason wong3 lookup & reference formulasWednesday, July 27, 2011Excel Functions and FormulasUse VLOOKUP To Find Specific DataUse HLOOKUP To Find Values In RowsUse INDEX & MATCH To Retrieve Data

Jason wong4 text formulasWednesday, July 27, 2011Excel Functions and FormulasChange Case Of TextCombine Text And Formatted NumbersConvert Imported Text Format Into NumbersBreak Imported Date Field Into Individual ColumnsExtract A Name Field Into Three Columns

Jason wong5 date & time formulasWednesday, July 27, 2011Excel Functions and FormulasAdd a Number To Current Date To Get New DatesCalculate A Period Of Time Between Two DatesPerform Calculation With Time Fields

Jason wong7 efficiency tipsWednesday, July 27, 2011Excel Functions and FormulasReduce Formula Recalculation TimeEnter Formulas Quickly By Shortening Sheet NamesSelect & Protect Cells Containing FormulasReduce Data Entry Errors By Using Data ValidationDisplay & Print Formula SyntaxUse Auditing Tools To Check For ErrorsCheck Data By Using Trace PrecedentsUse Comments To Annotate Your Worksheet

Jason wong6 array & database functionsWednesday, July 27, 2011Excel Functions and FormulasUse Array FormulasCalculate The Difference Between Maximum And Minimum Values In An ArrayFind Value In ListUse FREQUENCY Function To Count ResponsesAnalyze Data In A Database

Jason wongExploring Excel FunctionsAggregation FunctionsDate/Time FunctionsWednesday, July 27, 2011Excel Functions and Formulas=sum (range_of_numbers)=average (range_of_numbers)=max (range_of_numbers)=min (range_of_numbers)=count (range_of_data)=counta (range_of_data)

Ctrl+;=now()=day(date)=month (date)=year (date)=date(day,month,year)=hour()=minute()

Jason wongCount will return number of numerical value cells

CountA count both numerical and non-numerical- A1=123, A2=Ali,A3=Abu,A4=Akau,A5=55

Countblank return count empty cells

Day return day 1 to 31

Find the dates differentA1=15/9/2010A2=ctrl+; insert the current dateA3=A2-A1OrA3=max(a1:a2)-min(a1:a2)

=weekday(9

DATE Function ScenarioWednesday, July 27, 2011Excel Functions and FormulasGiven A1=24th May 2008Renew car license the following year, same day same monthFormula is=date(year(A1)+1,month(A1),day(A1))Given License date A1=30th August 2009Find out the renewal dates which falls on the following year but first day of the month=date(year(a1)+1,month(a1),1)Given current road tax on A1=30th August 2009Find out the renewal date which falls half a year later, but must be on the 10th of the month =date(year(date), month(date)+6, 10) Student A borrowed a book on the 15th Feb 2010 The returning due date of the book is 1 monthlater=date(year(date), month(date)+1,day(date)) Student A borrowed a book on the 15th Feb 2010 Return book at the end of the following month=date(year(date), month(date) +2, 1)-1

Jason wongQ&A 1. Given A1=24th May 2008Renew car license the following year, same day same monthAnswer : =date(year(A1)+1,month(A1),day(A1)2. Renew car license the following year but first day of the monthAnswer : =DATE(YEAR(A1)+1,MONTH(A1),1)3. Renew car road tax half a year later, but must be on the 10th day of the month Answer :=date(year(A1), month(A1)+6, 10)4. The returning due date of the book is 1 month laterAnswer := date(year(date), month(date)+1,day(date))5. Return book at the end of the following monthAnswer := date(year(date), month(date) +2, 1)-1

10

Advanced FunctionsWednesday, July 27, 2011Excel Functions and FormulasNested FunctionUsing IF function=SUMIF( range, criteria )=AVERAGEIF( range,criteria )=COUNTIF( range,criteria )

=if(Condition, True, False)=if(200*2>300, Answer is Higher, Answer is Lower)A1=James=if(A1=James,Is The Boss, Is a Staff)A1=500, A2=300, A3=800A4=sumif(A1:A3,>=500)=sum(max(range_a),min(range_b),max(range_c))

Jason wongNested function=sum(max(range_a),min(range_b),max(range_c))

Sumif to sum up a range if the cell contain satisfy the criteriaA1=500A2=800A3=300A4=sumif(A1:A3,>=500)

Column A contains Gender, Column B Department, Column C contains Salary=Sumif (A2:A10,female,C2:C10)

NOTE: there is no maxif or minif function as of 2007, but dmax and dmin replaced them

11

Working with Names and RangesWednesday, July 27, 2011Excel Functions and FormulasWhat are Range Names?Defining and Using Range NamesCreate Name Range from SelectionAuto Calculate

Jason wongRange NameTo access frequently used cellsTo give a meaningfull name to cell range for more readability and clarity

For repeating messagesLike having one spreadsheet with company name, address, greetings message with name range, then insert name range into any other spreadsheetFormula > Define NameOrSelect the cell or cells > on formula bar > enter a nameNOTE: Acceptable names letters onlyNo spacesUnderscoreHold ctrl to select non-adjacent ranges

Create Range Name from SelectionType in A1=Jan B1=Feb C1=Mar A2-C5 = any numbersHighlight A1:C5 or ctrl+aFormulas > Create From Selection , Top columnNow type D2=Sales, D3=Profit, D4=ExpensesCtrl+a, Formulas > Create From Selection, top and right column

Autocalculate allows you to view result of some basic calculation without having to enter a formula or functionRight click any part at the status bar. Tick those function you want to see, untick not to view them

12

Working with Array FormulasWednesday, July 27, 2011Excel Functions and Formulas

Using IF Function in Array FormulasUsing Basic Array Formulas

Jason wongArrayProtection: Whenever there is a change the whole array need to change simultaneously, no single cell changes alone.

Basic Array FormulaDemo 1:Type in random numbers in A2 to C7 (3 columns)Now highlight D2 to F7 (must be same block size)Create a formula, say to increase all numbers by 3% =A2:C7*103/100 Make sure to Ctrl+Shft+Enter

Using IF in ArrayDemo 2:From the table in demo 1, highlight G2 to G7 =if(A2:A7=B2:B7,A2:A7,Not Same) Ctrl+shft+enterNext, sum up the similar numbers G8 = sum(if(A2:A7=B2:B7,A2:A7,Not Same))Ctrl+shft+enter

Demo 3: Using table 2 : Score BoardHighlight D1 to D4 =IF(D1:D4>F1:F4,C1:C4,E1:E4) , ctrl+shft+enter

13

Exercise

Wednesday, July 27, 2011Excel Functions and Formulas

Jason wongUsing if and date function finds outIf the current month falls on july and beyond, the delivery date should be on the following year jun, 15If the current month falls before july, delivery date will be jun 15 the same yr

14

Presented byJason WongEmail : [email protected] : +6012-273-6143Wednesday, July 27, 2011Excel functions and formulasthe end ~ thank you!

Jason wongSheet1ABC1SalesExpensesTax233345355556422232523253625255719182.5

Sheet1City1ScoresCity2ScoresWinnerLiverpool4ManU0Arsenal3Liverpool4ManCity2ManU1ManU4Arsenal9Arsenal2ManCity5