SlideShare une entreprise Scribd logo
1  sur  55
Excel 2003

Learning to design spreadsheets and
          manipulate data


            © Tim Ward 2009 – all rights reserved
Introduction

• Excel 2003
• Needs to be interactive or will be “Death by
  Powerpoint”
• Many levels of knowledge – no question is
  stupid




                  © Tim Ward 2009 – all rights reserved
Suggested Agenda
•   Spreadsheet Design                                  •      Visual Basic
     •   Think before you build                                  •        Introduction
     •   Simple Functions                                        •        Recording Macros
     •   Named Ranges                                            •        Editing Macros
     •   Navigation                                              •        Custom Functions
     •   Toolbars
     •   Formatting
     •   Objects (Pictures etc)

•   Data Handling
     •   Text Functions
     •   Lookup &Reference Functions
     •   If statements
     •   Nesting Formulae
     •   Error Handling
     •   Pivot Tables
                                  © Tim Ward 2009 – all rights reserved
Spreadsheet Design
            “Think before you build”
• Questions you should be able to answer
  •   What is the purpose of my spreadsheet?
  •   Who is going to use it?
  •   What are the inputs?
  •   What are the outputs?
  •   Who is the audience for the output?




                     © Tim Ward 2009 – all rights reserved
Spreadsheet Design
             “Think before you build”
• Simple rules for good design
  • Never change imported data
  • Never link workbooks
       • create an output sheet and copy it instead
  •   Always have a worksheet for constants
  •   Use named ranges
  •   Try to place input cells on a separate page
  •   Apply consistent formatting always
       • Develop a team style and be anal about applying it


                        © Tim Ward 2009 – all rights reserved
Spreadsheet Design
                 Simple functions
• Simplest Function
   • =A1
   • Refers to the value in cell A1
   • When copied the reference will change
• Fixed references
   • Use Named range
   • Use “$” to fix row or column or both
   • {F4} cycles between the options
      • =$A$1 – both row and column fixed
      • =$A1 – just column fixed
      • =A$1 – just row fixed
• Try it now
                        © Tim Ward 2009 – all rights reserved
Spreadsheet Design
               Simple functions
• Other simple functions:
  • =SUM()
     • adds up a range
  • =COUNT()
     • counts the number of numbers in a range
  • =COUNTA()
     • counts the number of non blank cells in a range
  • =SUMIF(lookup_range, criteria, sum_range)
     • Adds up values in a range matching a criteria


                      © Tim Ward 2009 – all rights reserved
Spreadsheet Design
                Named Ranges
•   Refers to a cell or cells
•   Can be fixed or relative
•   Makes formulae easier to read  understand
•   Insert a single name by:
    • Insert > Name > Define
• Insert Multiple Names
    • Insert > Name > Create


• Examples
                    © Tim Ward 2009 – all rights reserved
Spreadsheet Design
              Navigation & Shortcuts
• Using the Keyboard is much more efficient than
  clicking with the mouse, but it is a personal choice…
   • {Ctrl}+{Space} – select the whole column
   • {Shift}+{Space} – select the whole row
   • {Ctrl}+{Arrow Down} – move to last cell in current range in
     the current column
   • {Ctrl}+{End}- move to last cell in worksheet
   • {Ctrl}+{Page Up} – move to worksheet next on right
   • {Ctrl}+{Page Down} – move to worksheet next on left
   • {Ctrl}+{Tab} – Cycle through open workbooks
   • Right Click Button
   • {Alt}+{Underlined Letters} – Use menu items with keyboard
                        © Tim Ward 2009 – all rights reserved
Spreadsheet Design
                      Formatting
• How something is presented is at least as important
  as what is being presented
• Formatting may be different for different media
• Decide on and use standard formats for:
   •   Font
   •   Borders & Shading
   •   Numbers
   •   Colour Schema
   •   Headings, Details, Totals etc
• Never Hide a column or row use Outline Symbols
  instead
• Aim for professional but do not be too “bold”
                          © Tim Ward 2009 – all rights reserved
Spreadsheet Design
               Objects  Pictures
• Almost any “object” can be embedded
  •   Pictures (JPEG, GIF, BMP etc)
  •   VISIO
  •   Other Excel ranges
  •   Excerpts from Word (and vica versa)
  •   Video
  •   Sounds
• IMPORTANT: Make sure the Aspect Ratio is
  maintained
• Try it now…
                     © Tim Ward 2009 – all rights reserved
Data Handling

• Very rare to input all data into a spreadsheet
• Important to be able to manipulate data and
  represent it as required
• Pivot Tables
   • Powerful for ad-hoc analysis
   • Not great for standard reporting
• Many categories of function – covering today
   •   TEXT
   •   LOOKUP
   •   INFORMATION
   •   LOGICAL
                        © Tim Ward 2009 – all rights reserved
TEXT Functions

• Broadly 2 categories
  • Formatting
  • Extracting and Searching
• Often used in combination with other
  formulae
• First lets cover the most useful functions




                   © Tim Ward 2009 – all rights reserved
TEXT Functions - Formatting

• Data extracted from systems has often been
  inconsistently input with different cases and spacing.
   • This looks unprofessional
   • Can lead to incorrect lookup results
• 6 Functions
   •   =PROPER()
   •   =UPPER()
   •   =LOWER()
   •   =TEXT()
   •   =VALUE()
   •   =TRIM()



                         © Tim Ward 2009 – all rights reserved
TEXT Functions - Formatting

• Go to the TEXT - Formatting Worksheet
• Example text in cell A6
       “thE qUicK bRown FOX JumPs Over tHe lAZy dog”
  • Hard to read and looks scrappy
• Type =PROPER(A6) into Cell B6
  • This capitalizes the first letter of each word and
    makes all other letters lower case




                     © Tim Ward 2009 – all rights reserved
TEXT Functions - Formatting

• Type =UPPER(A6) into Cell B7
• This capitalizes all letters in the text

• Type =LOWER(A6) into Cell B7
• This changes all letters in the text to lower
  case



                    © Tim Ward 2009 – all rights reserved
TEXT Functions - Formatting

• Excel has a “code” for number formats.
  •   dd-mmm-yyyy formats dates to read “16-Jun-2001”
  •   Or dd-mm-yy = 16-06-01
  •   #,##0 would format the number 1234 to 1,234
  •   #,##0.00 would format the number 1234 to 1,234.00
  •   00000 would format the number 1234 to 01234
  •   Q00 C000 would format the number 1234 to Q01 C234
  •   Etc…

• This syntax can be used to define your
  own custom formats
• Everyone happy?
                         © Tim Ward 2009 – all rights reserved
TEXT Functions - Formatting

• =TEXT(Cell,Format)
  • Converts a number into text
  • Format is per the previous slide
• Type =TEXT(A11,”#,##0.00“ in to cell B11
• =VALUE()
  • Converts text into a number
• Type =VALUE(B11) into cell B12


                    © Tim Ward 2009 – all rights reserved
TEXT Functions - Formatting

•   Finally the TRIM() function
•   Text strings can have inconsistent spacing
•   This makes it hard to manipulate the data
•   It can make it hard to read
•   TRIM() removes all spaces and replaces them
    with a single space between each “word”



                   © Tim Ward 2009 – all rights reserved
TEXT Functions
         Extracting and Searching
• Selecting Part of a text string
   • LEFT(), RIGHT() and MID()
   • Useful when:
      • Text has structure
      • Want to display only part of the text
      • Want to extract a number from a text string
   • Often combined with lookup & other functions
• Searching within a text string
   • FIND()

                       © Tim Ward 2009 – all rights reserved
TEXT Functions
          Extracting and Searching
• =LEFT(Cell,NoChar)
   • Returns a text string “NoChar” long starting from the far left
     of the “Cell”
• Type =LEFT(A19,3) into cell B19
   • This returns “thE”
• Now try typing =UPPER(LEFT(A19,3)) in cell B20 -
  What do you think the result will be?




                          © Tim Ward 2009 – all rights reserved
TEXT Functions
            Extracting and Searching
• =RIGHT(Cell,NoChar)
    • Returns a text string “NoChar” long starting from the far right of
      the “Cell”
• Type =RIGHT (A19,3) into cell B21
    • This returns “dog”

• =MID(Cell,Start,NoChar)
    • Returns a text string “NoChar” long starting “Start” letters into the
      “Cell”
• Type =MID(A19,5,5) in cell B22
    • This returns “qUicK”
• Try writing your own formula to convert this to read “Quick” in
  cell B23

                             © Tim Ward 2009 – all rights reserved
TEXT Functions
         Extracting and Searching
• Selecting Part of a text string
   • LEFT(), RIGHT() and MID()

• =LEFT(Cell,NoChar)
   • Returns a text string “NoChar” long starting from
     the far left of the “Cell”
• Type =LEFT(A19,3) into cell B19
   • This returns “thE”
• Now try typing =UPPER(LEFT(A19,3)) in cell
  B20 - What do you think the result will be?
                     © Tim Ward 2009 – all rights reserved
TEXT Functions
            Extracting and Searching
• Left, Right and Mid are useful but what if you don’t know:
    • How long the text string should be
    • Where the text string starts

• The “FIND” function becomes important
• =FIND(String,Cell,Start)
    • String - the text you want to search for (case sensitive)
    • Cell - The cell containing the text you want to search
    • Start - Where in the cell to start searching




                            © Tim Ward 2009 – all rights reserved
TEXT Functions
          Extracting and Searching
• Try typing =FIND(“o”,A19) in cell B24
   • This gives the result 13
   • i.e. the first LOWER case “o” in cell A19 is at position 13

• Try typing =FIND(“O”,A19) in cell B24
   • This gives the result 18
   • i.e. the first UPPER case “O” in cell A19 is at position 18




                          © Tim Ward 2009 – all rights reserved
TEXT Functions
                     Exercise

Data has been extracted from a system which contains values which are
structured as follows: a variable length code followed by a container
number followed by the delivery point and the Vessel Name
The container number and delivery point need to be extracted into
Columns B and C as Headed


 - Switch to the “TEXT - Exercise” Worksheet
 - Using the LEFT, RIGHT, MID, and FIND functions
1. write a formulae to extract the container number
2. write a formulae to extract the Delivery Point

                         © Tim Ward 2009 – all rights reserved
TEXT Functions
              Exercise Review
• To extract the container number from column A we
  would use the MID function.
• =MID(Cell,Start,NoChar)
• Cell is easy
• Container numbers are always the same length so we
  know that NoChar is 11
• How do we work out where the container number
  starts?




                    © Tim Ward 2009 – all rights reserved
TEXT Functions
               Exercise Review
• If we look at the data container number is always
  proceeded by a space
• We can use the find function to work out which
  position the space is in
• =FIND(“ “,Cell)
• And we know that the container number starts 1
  character after the space
• So the formula would be
• =MID(Cell,FIND(“ “,Cell)+1,11)



                     © Tim Ward 2009 – all rights reserved
TEXT Functions
                    Exercise Review
• For the Whiz Kids
• The elements of the formula are:
  • Cell - as before
  • Start - FIND(" ",A3,FIND(" ",A3,12)+1)+1
     • The character after the second space

  • NoChar - FIND(" ",A3,FIND(" ",A3,FIND("
    ",A3)+1)+1)-(FIND(" ",A3,FIND(" ",A3,12)+1))
     • The number of characters between the third space and the second space



   We can go through this later if anyone wants to :-)

                             © Tim Ward 2009 – all rights reserved
Summary - TEXT Functions

• You have learnt how to:
  • Change the case and data type of a cell with
    LOWER, UPPER, PROPER, TEXT, VALUE and TRIM
    functions
  • Extract parts of a text string with LEFT, RIGHT
    and MID functions
  • Search for stings within a cell with the FIND
    function
  • Combine the FIND and MID functions to increase
    their flexibility
                   © Tim Ward 2009 – all rights reserved
Lookup & Reference Functions

• There are many of these functions. This
  section will cover:
• VLOOKUP and HLOOKUP
• MATCH & INDEX
• ROW
• COLUMN
• OFFSET


                 © Tim Ward 2009 – all rights reserved
Lookup & Reference Functions

• Lookup functions quite inefficient
   • Character by character match
   • Very slow
   • Need error trapping
• Sorting important
• If lot of similar lookups or error trapping
   • Use Match and Index instead of HVLOOKUP



                    © Tim Ward 2009 – all rights reserved
Lookup and Reference Functions
      VLOOKUP and HLOOKUP
• These lookup functions search for a value in the first
  row or column of a range and return the value x
  rows or columns away from the match.
• These functions have the same syntax but perform
  their searches in different directions
   • “V” = Vertical and this function works by searching down
     columns
   • “H” = Horizontal and this function works by searching across
     rows




                        © Tim Ward 2009 – all rights reserved
Lookup and Reference Functions
                VLOOKUP
• Data must be arranged in columns
• =VLOOKUP(What,Where,Return,Match_Type)
• Where = the range containing the data
   • The values for “What” must be in the first Column
• What = the value to be looked up in the first column
  of “Where”
• Return = the column in the “Where” range that
  contains the values to be returned
• Match_Type = the type of match required
   • 0 = an exact match (not case sensitive), Returns “#N/A” if
     no match is found
   • 1 = the closest match that is less than or equal to the What
     value (1st column of “Where” must be in ascending order)
                        © Tim Ward 2009 – all rights reserved
Lookup and Reference Functions
                HLOOKUP
• Data must be arranged in Rows
• =HLOOKUP(What,Where,Return,Match_Type)
• Where = the range containing the data
   • The values for “What” must be in the first Row
• What = the value to be looked up in the first row of
  “Where”
• Return = the row in the “Where” range that contains
  the values to be returned
• Match_Type = the type of match required
   • 0 = an exact match (not case sensitive), Returns “#N/A” if
     no match is found
   • 1 = the closest match that is less than or equal to the What
     value (1st column of “Where” must be in ascending order)
                        © Tim Ward 2009 – all rights reserved
Lookup and Reference Functions

• =MATCH(What,Where,Match_Type)
  • Use on single row or column
  • Returns the number of the row or column where the match
    is found
  • What = the value to be looked up
  • Where = the range to do the lookup in
  • Match_Type = the type of match required
     • -1 - finds the smallest value that is greater than or equal to
       “What”. “Where” must be placed in descending order
     • 0 - finds the first value that is exactly equal to “What”. “Where”
       can be in any order. Returns “#N/A” if no match is found
     • 1 - finds the largest value that is less than or equal to “What”.
       “Where” must be placed in ascending order
                         © Tim Ward 2009 – all rights reserved
Lookup and Reference Functions

• =INDEX(RANGE,Row_No,Column_No)
  • Returns the value at the intersection of the
    Row_No and Column_No in the RANGE
  • Like coordinates in Maths
• Much faster than lookup as no searching
• Combine with “Match” – error trapped
  lookups, efficient multi column return
• Combine with SUM to allow formula to cope
  with increasing periods etc
                    © Tim Ward 2009 – all rights reserved
Lookup and Reference Functions

• =ROW()
  • Returns the number of the row the cell is in
• =COLUMN()
  • Returns the number of the column the cell is in
• Sometimes useful in calculations
  • e.g. January is in column E (or 5), Feb in F etc.
     • If you need to use the month in the formula in a column
       then COLUMN()-4 gives this.



                      © Tim Ward 2009 – all rights reserved
Lookup and Reference Functions

• =OFFSET(Reference,Row_Down,Column_Across)
   • Returns the value in the cell x Row_Down and y
     Column_Across from the Reference


• Useful alternative to index if selecting values
  from a table where you need both rows and
  columns to be variable



                    © Tim Ward 2009 – all rights reserved
IF Statements

• If statements let a formula return different
  values or perform different calculations
  depending on the result of a logical test
• A logical test is any expression that can be
  evaluated as TRUE or FALSE
  • Black = White is a logical test and would return
    FALSE
  • Age >= 21 is a logical test which would return
    true if the value for Age was greater than or equal
    to 21
                    © Tim Ward 2009 – all rights reserved
IF Statements

• =IF(Expr,Value_If_True,Value_If_False)

• Expr is the logical test
• Value_If_True is the result if Expr evaluates
  to true
• Value_If_False is the result if Expr evaluates
  to false


                   © Tim Ward 2009 – all rights reserved
IF Statements

• Sometimes the result of an IF statement
  depends on more than one Logical Test
• OR and AND Expressions can be used to add
  this functionality to an IF statement

• AND(Expr1, Expr2, …, Expr30)
• If all of the Expr’s evaluate to TRUE then the
  AND statement evaluates to TRUE otherwise
  it evaluates to FALSE
                   © Tim Ward 2009 – all rights reserved
IF Statements

• OR(Expr1, Expr2, …, Expr30)
• If ANY of the Expr’s evaluate to TRUE then
  the OR statement evaluates to TRUE




                  © Tim Ward 2009 – all rights reserved
Error Handling

• Errors make totalling difficult and look
  unprofessional
• Need to trap errors
• Use if statement combined with:
   •   ISERROR
   •   ISNUMBER
   •   ISLOGICAL
   •   ISNA
   •   IS…
                     © Tim Ward 2009 – all rights reserved
Error Handling

• All “IS…” functions have the same format
• Most common is “ISERROR”
• =ISERROR(EXPRESSION)
  • Tests the value to see if it is an Excel error
     • #N/A, #REF, #VALUE etc
  • If it is an error then the formula evaluates to
    TRUE
  • If not an error then the formula evaluates to
    FALSE

                     © Tim Ward 2009 – all rights reserved
Pivot Tables

• Very powerful tool – revolutionised analysis
• Not great for standard reporting
  • Can change size and shape
• Tricks for forcing standard size and shape
• Data sources
  • External
  • Worksheet
  • Another Pivot Table
• Formatting
                   © Tim Ward 2009 – all rights reserved
Visual Basic for Applications

•   Language Structure
•   Recording Macros
•   Editing Macros
•   Custom Functions




                   © Tim Ward 2009 – all rights reserved
Visual Basic for Applications

• Can be used for:
  •   Automating repetitive tasks
  •   Guiding users with messages and dialog boxes
  •   Restricting functionality
  •   Designing custom menus and toolbars
  •   Custom Functions
• Structure is the same between office
  applications
  • Objects may vary

                     © Tim Ward 2009 – all rights reserved
Visual Basic for Applications

• Language Structure
• VBA is an Object Orientated Language
   •   Almost everything in Excel is an Object
   •   Workbooks, Worksheets, Cells
   •   An object is a thing that you want to do something to
   •   Objects are grouped in collections
• Objects have PROPERTIES
   • The font size, value in a cell etc
• You do things towith OBJECTS using a METHOD
   • Copy, Paste, Delete
• The best way to start learning is to record a Macro
                          © Tim Ward 2009 – all rights reserved
Visual Basic For Applications

• Look at the macro we just recorded
  • Tools > Macro > Visual Basic Editor
  • Make sure the project explorer is showing on the
    left – if not click {Ctrl}+R or go to the View menu
  • Look for VBA Project (My Name.xls)
  • Click the + sign next to it to expand the container
• VBA Code is stored in a Module
  • Click the + sign next to the Modules folder
  • There should be a “Module 1”
  • Double Click this module
                    © Tim Ward 2009 – all rights reserved
Visual Basic for Applications

• All macros start with the word sub followed
  by the macro name followed by brackets
• The macro we recorded starts
                  Sub Macro1()
• All macros end with the words
                    End Sub()
• Lets look at the detail..


                  © Tim Ward 2009 – all rights reserved
Visual Basic for Applications

• Macro’s can be edited once you understand
  their structure
• Reading our macro is there anything that is
  superfluous?
• Other common edits
  • add a loop
     • Repeats the same action for a number of Worksheets or
       Ranges etc
     • Do WhileUntil… Loop
     • For…Next
     • For Each xxx in xxx … Next xxx
                     © Tim Ward 2009 – all rights reserved
Visual Basic for Applications

• Other common edits
  • add a loop
     • Repeats the same action for a number of Worksheets or
       Ranges etc
     • Do WhileUntil… Loop
     • For…Next
     • For Each xxx in xxx … Next xxx
  • with xxxx
     • Allows many properties to be set for the same object
  • If ... Then … Else … End if

                      © Tim Ward 2009 – all rights reserved
Thanks for your time

• Anything I’ve not covered?
• Anything unclear?
• Suggestions for improvement?




                 © Tim Ward 2009 – all rights reserved
Further Training and Info

• Microsoft’s site full of useful courses for free
   • http://office.microsoft.com/en-us/training/CR0618311410
• TechNet useful for more technical help
   • http://technet.microsoft.com/en-gb/office/default.aspx




                     © Tim Ward 2009 – all rights reserved

Contenu connexe

En vedette

Bidzuku Pitch Deck
Bidzuku Pitch DeckBidzuku Pitch Deck
Bidzuku Pitch Deckjoshuahays
 
How to become world class business analyst
How to become world class business analystHow to become world class business analyst
How to become world class business analystAsen Gyczew
 
Polyflint pitch deck
Polyflint pitch deckPolyflint pitch deck
Polyflint pitch deckpolyflint
 
Pitch deck for Kejahunt
Pitch deck for KejahuntPitch deck for Kejahunt
Pitch deck for KejahuntJoshua Mutua
 
Swipes pitch deck for Beta Pitch 2013 Finals in Berlin
Swipes pitch deck for Beta Pitch 2013 Finals in BerlinSwipes pitch deck for Beta Pitch 2013 Finals in Berlin
Swipes pitch deck for Beta Pitch 2013 Finals in BerlinSwipes App
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with DataSeth Familian
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017Drift
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheLeslie Samuel
 

En vedette (9)

Bidzuku Pitch Deck
Bidzuku Pitch DeckBidzuku Pitch Deck
Bidzuku Pitch Deck
 
How to become world class business analyst
How to become world class business analystHow to become world class business analyst
How to become world class business analyst
 
Polyflint pitch deck
Polyflint pitch deckPolyflint pitch deck
Polyflint pitch deck
 
Pitch deck for Kejahunt
Pitch deck for KejahuntPitch deck for Kejahunt
Pitch deck for Kejahunt
 
Daily hundred Pitch Deck 2014
Daily hundred Pitch Deck 2014Daily hundred Pitch Deck 2014
Daily hundred Pitch Deck 2014
 
Swipes pitch deck for Beta Pitch 2013 Finals in Berlin
Swipes pitch deck for Beta Pitch 2013 Finals in BerlinSwipes pitch deck for Beta Pitch 2013 Finals in Berlin
Swipes pitch deck for Beta Pitch 2013 Finals in Berlin
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similaire à Excel 2003 Training for Business Analysts

Excel basics for everyday use part two
Excel basics for everyday use part twoExcel basics for everyday use part two
Excel basics for everyday use part twoKevin McLogan
 
Real time collaborative text editing, by Miroslav Hettes, Smarkup
Real time collaborative text editing, by Miroslav Hettes, SmarkupReal time collaborative text editing, by Miroslav Hettes, Smarkup
Real time collaborative text editing, by Miroslav Hettes, SmarkupSmarkup
 
Apl – a programming language
Apl – a programming languageApl – a programming language
Apl – a programming languageBryan Wilson
 
MS Excel training (Vidushi Khera)
MS Excel training (Vidushi Khera)MS Excel training (Vidushi Khera)
MS Excel training (Vidushi Khera)Vidushi Khera
 
GRADE 9 MSEXCEL.ppt
GRADE 9 MSEXCEL.pptGRADE 9 MSEXCEL.ppt
GRADE 9 MSEXCEL.pptCherryLim21
 
Excel basics for everyday use
Excel basics for everyday useExcel basics for everyday use
Excel basics for everyday useKevin McLogan
 
OracleSQLraining.pptx
OracleSQLraining.pptxOracleSQLraining.pptx
OracleSQLraining.pptxRajendra Jain
 
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJSThe Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJSmfyleman
 
Ms Excel 2007 & 2010 Workshop
Ms Excel 2007 & 2010 WorkshopMs Excel 2007 & 2010 Workshop
Ms Excel 2007 & 2010 WorkshopCA Aditya Singhal
 

Similaire à Excel 2003 Training for Business Analysts (20)

Excel basics for everyday use part two
Excel basics for everyday use part twoExcel basics for everyday use part two
Excel basics for everyday use part two
 
Real time collaborative text editing, by Miroslav Hettes, Smarkup
Real time collaborative text editing, by Miroslav Hettes, SmarkupReal time collaborative text editing, by Miroslav Hettes, Smarkup
Real time collaborative text editing, by Miroslav Hettes, Smarkup
 
Latex intro
Latex introLatex intro
Latex intro
 
Apl – a programming language
Apl – a programming languageApl – a programming language
Apl – a programming language
 
Sql server
Sql serverSql server
Sql server
 
MS Excel training (Vidushi Khera)
MS Excel training (Vidushi Khera)MS Excel training (Vidushi Khera)
MS Excel training (Vidushi Khera)
 
GRADE 9 MSEXCEL.ppt
GRADE 9 MSEXCEL.pptGRADE 9 MSEXCEL.ppt
GRADE 9 MSEXCEL.ppt
 
Excel basics for everyday use
Excel basics for everyday useExcel basics for everyday use
Excel basics for everyday use
 
Lunch 'n Learn - Word: Basic document techniques
Lunch 'n Learn - Word: Basic document techniquesLunch 'n Learn - Word: Basic document techniques
Lunch 'n Learn - Word: Basic document techniques
 
OracleSQLraining.pptx
OracleSQLraining.pptxOracleSQLraining.pptx
OracleSQLraining.pptx
 
Day wise ms word
Day wise ms wordDay wise ms word
Day wise ms word
 
Mssql
MssqlMssql
Mssql
 
Google Go Overview
Google Go OverviewGoogle Go Overview
Google Go Overview
 
Python Tutorial Part 1
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
 
'Spreadsheet'
'Spreadsheet''Spreadsheet'
'Spreadsheet'
 
C++ overview
C++ overviewC++ overview
C++ overview
 
06 Excel.pdf
06 Excel.pdf06 Excel.pdf
06 Excel.pdf
 
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJSThe Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
 
Ms Excel 2007 & 2010 Workshop
Ms Excel 2007 & 2010 WorkshopMs Excel 2007 & 2010 Workshop
Ms Excel 2007 & 2010 Workshop
 
ME119-L1.pdf
ME119-L1.pdfME119-L1.pdf
ME119-L1.pdf
 

Dernier

Anyhr.io | Presentation HR&Recruiting agency
Anyhr.io | Presentation HR&Recruiting agencyAnyhr.io | Presentation HR&Recruiting agency
Anyhr.io | Presentation HR&Recruiting agencyHanna Klim
 
Slicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup BerlinSlicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup BerlinAnton Skornyakov
 
Introduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptxIntroduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptxJemalSeid25
 
Project Brief & Information Architecture Report
Project Brief & Information Architecture ReportProject Brief & Information Architecture Report
Project Brief & Information Architecture Reportamberjiles31
 
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdfGraham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdfAnhNguyen97152
 
Developing Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, OursDeveloping Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, OursKaiNexus
 
Team B Mind Map for Organizational Chg..
Team B Mind Map for Organizational Chg..Team B Mind Map for Organizational Chg..
Team B Mind Map for Organizational Chg..dlewis191
 
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)tazeenaila12
 
The Vietnam Believer Newsletter_MARCH 25, 2024_EN_Vol. 003
The Vietnam Believer Newsletter_MARCH 25, 2024_EN_Vol. 003The Vietnam Believer Newsletter_MARCH 25, 2024_EN_Vol. 003
The Vietnam Believer Newsletter_MARCH 25, 2024_EN_Vol. 003believeminhh
 
MC Heights construction company in Jhang
MC Heights construction company in JhangMC Heights construction company in Jhang
MC Heights construction company in Jhangmcgroupjeya
 
Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access
 
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...AustraliaChapterIIBA
 
Lecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb toLecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb toumarfarooquejamali32
 
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdf
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdfTalent Management research intelligence_13 paradigm shifts_20 March 2024.pdf
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdfCharles Cotter, PhD
 
Entrepreneurship & organisations: influences and organizations
Entrepreneurship & organisations: influences and organizationsEntrepreneurship & organisations: influences and organizations
Entrepreneurship & organisations: influences and organizationsP&CO
 
Borderless Access - Global Panel book-unlock 2024
Borderless Access - Global Panel book-unlock 2024Borderless Access - Global Panel book-unlock 2024
Borderless Access - Global Panel book-unlock 2024Borderless Access
 
A flour, rice and Suji company in Jhang.
A flour, rice and Suji company in Jhang.A flour, rice and Suji company in Jhang.
A flour, rice and Suji company in Jhang.mcshagufta46
 
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView
 
BCE24 | Virtual Brand Ambassadors: Making Brands Personal - John Meulemans
BCE24 | Virtual Brand Ambassadors: Making Brands Personal - John MeulemansBCE24 | Virtual Brand Ambassadors: Making Brands Personal - John Meulemans
BCE24 | Virtual Brand Ambassadors: Making Brands Personal - John MeulemansBBPMedia1
 

Dernier (20)

Anyhr.io | Presentation HR&Recruiting agency
Anyhr.io | Presentation HR&Recruiting agencyAnyhr.io | Presentation HR&Recruiting agency
Anyhr.io | Presentation HR&Recruiting agency
 
Slicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup BerlinSlicing Work on Business Agility Meetup Berlin
Slicing Work on Business Agility Meetup Berlin
 
Introduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptxIntroduction to The overview of GAAP LO 1-5.pptx
Introduction to The overview of GAAP LO 1-5.pptx
 
Project Brief & Information Architecture Report
Project Brief & Information Architecture ReportProject Brief & Information Architecture Report
Project Brief & Information Architecture Report
 
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdfGraham and Doddsville - Issue 1 - Winter 2006 (1).pdf
Graham and Doddsville - Issue 1 - Winter 2006 (1).pdf
 
Developing Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, OursDeveloping Coaching Skills: Mine, Yours, Ours
Developing Coaching Skills: Mine, Yours, Ours
 
Team B Mind Map for Organizational Chg..
Team B Mind Map for Organizational Chg..Team B Mind Map for Organizational Chg..
Team B Mind Map for Organizational Chg..
 
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
Harvard Business Review.pptx | Navigating Labor Unrest (March-April 2024)
 
The Vietnam Believer Newsletter_MARCH 25, 2024_EN_Vol. 003
The Vietnam Believer Newsletter_MARCH 25, 2024_EN_Vol. 003The Vietnam Believer Newsletter_MARCH 25, 2024_EN_Vol. 003
The Vietnam Believer Newsletter_MARCH 25, 2024_EN_Vol. 003
 
MC Heights construction company in Jhang
MC Heights construction company in JhangMC Heights construction company in Jhang
MC Heights construction company in Jhang
 
Investment Opportunity for Thailand's Automotive & EV Industries
Investment Opportunity for Thailand's Automotive & EV IndustriesInvestment Opportunity for Thailand's Automotive & EV Industries
Investment Opportunity for Thailand's Automotive & EV Industries
 
Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024Borderless Access - Global B2B Panel book-unlock 2024
Borderless Access - Global B2B Panel book-unlock 2024
 
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...
IIBA® Melbourne - Navigating Business Analysis - Excellence for Career Growth...
 
Lecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb toLecture_6.pptx English speaking easyb to
Lecture_6.pptx English speaking easyb to
 
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdf
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdfTalent Management research intelligence_13 paradigm shifts_20 March 2024.pdf
Talent Management research intelligence_13 paradigm shifts_20 March 2024.pdf
 
Entrepreneurship & organisations: influences and organizations
Entrepreneurship & organisations: influences and organizationsEntrepreneurship & organisations: influences and organizations
Entrepreneurship & organisations: influences and organizations
 
Borderless Access - Global Panel book-unlock 2024
Borderless Access - Global Panel book-unlock 2024Borderless Access - Global Panel book-unlock 2024
Borderless Access - Global Panel book-unlock 2024
 
A flour, rice and Suji company in Jhang.
A flour, rice and Suji company in Jhang.A flour, rice and Suji company in Jhang.
A flour, rice and Suji company in Jhang.
 
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
TalentView Webinar: Empowering the Modern Workforce_ Redefininig Success from...
 
BCE24 | Virtual Brand Ambassadors: Making Brands Personal - John Meulemans
BCE24 | Virtual Brand Ambassadors: Making Brands Personal - John MeulemansBCE24 | Virtual Brand Ambassadors: Making Brands Personal - John Meulemans
BCE24 | Virtual Brand Ambassadors: Making Brands Personal - John Meulemans
 

Excel 2003 Training for Business Analysts

  • 1. Excel 2003 Learning to design spreadsheets and manipulate data © Tim Ward 2009 – all rights reserved
  • 2. Introduction • Excel 2003 • Needs to be interactive or will be “Death by Powerpoint” • Many levels of knowledge – no question is stupid © Tim Ward 2009 – all rights reserved
  • 3. Suggested Agenda • Spreadsheet Design • Visual Basic • Think before you build • Introduction • Simple Functions • Recording Macros • Named Ranges • Editing Macros • Navigation • Custom Functions • Toolbars • Formatting • Objects (Pictures etc) • Data Handling • Text Functions • Lookup &Reference Functions • If statements • Nesting Formulae • Error Handling • Pivot Tables © Tim Ward 2009 – all rights reserved
  • 4. Spreadsheet Design “Think before you build” • Questions you should be able to answer • What is the purpose of my spreadsheet? • Who is going to use it? • What are the inputs? • What are the outputs? • Who is the audience for the output? © Tim Ward 2009 – all rights reserved
  • 5. Spreadsheet Design “Think before you build” • Simple rules for good design • Never change imported data • Never link workbooks • create an output sheet and copy it instead • Always have a worksheet for constants • Use named ranges • Try to place input cells on a separate page • Apply consistent formatting always • Develop a team style and be anal about applying it © Tim Ward 2009 – all rights reserved
  • 6. Spreadsheet Design Simple functions • Simplest Function • =A1 • Refers to the value in cell A1 • When copied the reference will change • Fixed references • Use Named range • Use “$” to fix row or column or both • {F4} cycles between the options • =$A$1 – both row and column fixed • =$A1 – just column fixed • =A$1 – just row fixed • Try it now © Tim Ward 2009 – all rights reserved
  • 7. Spreadsheet Design Simple functions • Other simple functions: • =SUM() • adds up a range • =COUNT() • counts the number of numbers in a range • =COUNTA() • counts the number of non blank cells in a range • =SUMIF(lookup_range, criteria, sum_range) • Adds up values in a range matching a criteria © Tim Ward 2009 – all rights reserved
  • 8. Spreadsheet Design Named Ranges • Refers to a cell or cells • Can be fixed or relative • Makes formulae easier to read understand • Insert a single name by: • Insert > Name > Define • Insert Multiple Names • Insert > Name > Create • Examples © Tim Ward 2009 – all rights reserved
  • 9. Spreadsheet Design Navigation & Shortcuts • Using the Keyboard is much more efficient than clicking with the mouse, but it is a personal choice… • {Ctrl}+{Space} – select the whole column • {Shift}+{Space} – select the whole row • {Ctrl}+{Arrow Down} – move to last cell in current range in the current column • {Ctrl}+{End}- move to last cell in worksheet • {Ctrl}+{Page Up} – move to worksheet next on right • {Ctrl}+{Page Down} – move to worksheet next on left • {Ctrl}+{Tab} – Cycle through open workbooks • Right Click Button • {Alt}+{Underlined Letters} – Use menu items with keyboard © Tim Ward 2009 – all rights reserved
  • 10. Spreadsheet Design Formatting • How something is presented is at least as important as what is being presented • Formatting may be different for different media • Decide on and use standard formats for: • Font • Borders & Shading • Numbers • Colour Schema • Headings, Details, Totals etc • Never Hide a column or row use Outline Symbols instead • Aim for professional but do not be too “bold” © Tim Ward 2009 – all rights reserved
  • 11. Spreadsheet Design Objects Pictures • Almost any “object” can be embedded • Pictures (JPEG, GIF, BMP etc) • VISIO • Other Excel ranges • Excerpts from Word (and vica versa) • Video • Sounds • IMPORTANT: Make sure the Aspect Ratio is maintained • Try it now… © Tim Ward 2009 – all rights reserved
  • 12. Data Handling • Very rare to input all data into a spreadsheet • Important to be able to manipulate data and represent it as required • Pivot Tables • Powerful for ad-hoc analysis • Not great for standard reporting • Many categories of function – covering today • TEXT • LOOKUP • INFORMATION • LOGICAL © Tim Ward 2009 – all rights reserved
  • 13. TEXT Functions • Broadly 2 categories • Formatting • Extracting and Searching • Often used in combination with other formulae • First lets cover the most useful functions © Tim Ward 2009 – all rights reserved
  • 14. TEXT Functions - Formatting • Data extracted from systems has often been inconsistently input with different cases and spacing. • This looks unprofessional • Can lead to incorrect lookup results • 6 Functions • =PROPER() • =UPPER() • =LOWER() • =TEXT() • =VALUE() • =TRIM() © Tim Ward 2009 – all rights reserved
  • 15. TEXT Functions - Formatting • Go to the TEXT - Formatting Worksheet • Example text in cell A6 “thE qUicK bRown FOX JumPs Over tHe lAZy dog” • Hard to read and looks scrappy • Type =PROPER(A6) into Cell B6 • This capitalizes the first letter of each word and makes all other letters lower case © Tim Ward 2009 – all rights reserved
  • 16. TEXT Functions - Formatting • Type =UPPER(A6) into Cell B7 • This capitalizes all letters in the text • Type =LOWER(A6) into Cell B7 • This changes all letters in the text to lower case © Tim Ward 2009 – all rights reserved
  • 17. TEXT Functions - Formatting • Excel has a “code” for number formats. • dd-mmm-yyyy formats dates to read “16-Jun-2001” • Or dd-mm-yy = 16-06-01 • #,##0 would format the number 1234 to 1,234 • #,##0.00 would format the number 1234 to 1,234.00 • 00000 would format the number 1234 to 01234 • Q00 C000 would format the number 1234 to Q01 C234 • Etc… • This syntax can be used to define your own custom formats • Everyone happy? © Tim Ward 2009 – all rights reserved
  • 18. TEXT Functions - Formatting • =TEXT(Cell,Format) • Converts a number into text • Format is per the previous slide • Type =TEXT(A11,”#,##0.00“ in to cell B11 • =VALUE() • Converts text into a number • Type =VALUE(B11) into cell B12 © Tim Ward 2009 – all rights reserved
  • 19. TEXT Functions - Formatting • Finally the TRIM() function • Text strings can have inconsistent spacing • This makes it hard to manipulate the data • It can make it hard to read • TRIM() removes all spaces and replaces them with a single space between each “word” © Tim Ward 2009 – all rights reserved
  • 20. TEXT Functions Extracting and Searching • Selecting Part of a text string • LEFT(), RIGHT() and MID() • Useful when: • Text has structure • Want to display only part of the text • Want to extract a number from a text string • Often combined with lookup & other functions • Searching within a text string • FIND() © Tim Ward 2009 – all rights reserved
  • 21. TEXT Functions Extracting and Searching • =LEFT(Cell,NoChar) • Returns a text string “NoChar” long starting from the far left of the “Cell” • Type =LEFT(A19,3) into cell B19 • This returns “thE” • Now try typing =UPPER(LEFT(A19,3)) in cell B20 - What do you think the result will be? © Tim Ward 2009 – all rights reserved
  • 22. TEXT Functions Extracting and Searching • =RIGHT(Cell,NoChar) • Returns a text string “NoChar” long starting from the far right of the “Cell” • Type =RIGHT (A19,3) into cell B21 • This returns “dog” • =MID(Cell,Start,NoChar) • Returns a text string “NoChar” long starting “Start” letters into the “Cell” • Type =MID(A19,5,5) in cell B22 • This returns “qUicK” • Try writing your own formula to convert this to read “Quick” in cell B23 © Tim Ward 2009 – all rights reserved
  • 23. TEXT Functions Extracting and Searching • Selecting Part of a text string • LEFT(), RIGHT() and MID() • =LEFT(Cell,NoChar) • Returns a text string “NoChar” long starting from the far left of the “Cell” • Type =LEFT(A19,3) into cell B19 • This returns “thE” • Now try typing =UPPER(LEFT(A19,3)) in cell B20 - What do you think the result will be? © Tim Ward 2009 – all rights reserved
  • 24. TEXT Functions Extracting and Searching • Left, Right and Mid are useful but what if you don’t know: • How long the text string should be • Where the text string starts • The “FIND” function becomes important • =FIND(String,Cell,Start) • String - the text you want to search for (case sensitive) • Cell - The cell containing the text you want to search • Start - Where in the cell to start searching © Tim Ward 2009 – all rights reserved
  • 25. TEXT Functions Extracting and Searching • Try typing =FIND(“o”,A19) in cell B24 • This gives the result 13 • i.e. the first LOWER case “o” in cell A19 is at position 13 • Try typing =FIND(“O”,A19) in cell B24 • This gives the result 18 • i.e. the first UPPER case “O” in cell A19 is at position 18 © Tim Ward 2009 – all rights reserved
  • 26. TEXT Functions Exercise Data has been extracted from a system which contains values which are structured as follows: a variable length code followed by a container number followed by the delivery point and the Vessel Name The container number and delivery point need to be extracted into Columns B and C as Headed - Switch to the “TEXT - Exercise” Worksheet - Using the LEFT, RIGHT, MID, and FIND functions 1. write a formulae to extract the container number 2. write a formulae to extract the Delivery Point © Tim Ward 2009 – all rights reserved
  • 27. TEXT Functions Exercise Review • To extract the container number from column A we would use the MID function. • =MID(Cell,Start,NoChar) • Cell is easy • Container numbers are always the same length so we know that NoChar is 11 • How do we work out where the container number starts? © Tim Ward 2009 – all rights reserved
  • 28. TEXT Functions Exercise Review • If we look at the data container number is always proceeded by a space • We can use the find function to work out which position the space is in • =FIND(“ “,Cell) • And we know that the container number starts 1 character after the space • So the formula would be • =MID(Cell,FIND(“ “,Cell)+1,11) © Tim Ward 2009 – all rights reserved
  • 29. TEXT Functions Exercise Review • For the Whiz Kids • The elements of the formula are: • Cell - as before • Start - FIND(" ",A3,FIND(" ",A3,12)+1)+1 • The character after the second space • NoChar - FIND(" ",A3,FIND(" ",A3,FIND(" ",A3)+1)+1)-(FIND(" ",A3,FIND(" ",A3,12)+1)) • The number of characters between the third space and the second space We can go through this later if anyone wants to :-) © Tim Ward 2009 – all rights reserved
  • 30. Summary - TEXT Functions • You have learnt how to: • Change the case and data type of a cell with LOWER, UPPER, PROPER, TEXT, VALUE and TRIM functions • Extract parts of a text string with LEFT, RIGHT and MID functions • Search for stings within a cell with the FIND function • Combine the FIND and MID functions to increase their flexibility © Tim Ward 2009 – all rights reserved
  • 31. Lookup & Reference Functions • There are many of these functions. This section will cover: • VLOOKUP and HLOOKUP • MATCH & INDEX • ROW • COLUMN • OFFSET © Tim Ward 2009 – all rights reserved
  • 32. Lookup & Reference Functions • Lookup functions quite inefficient • Character by character match • Very slow • Need error trapping • Sorting important • If lot of similar lookups or error trapping • Use Match and Index instead of HVLOOKUP © Tim Ward 2009 – all rights reserved
  • 33. Lookup and Reference Functions VLOOKUP and HLOOKUP • These lookup functions search for a value in the first row or column of a range and return the value x rows or columns away from the match. • These functions have the same syntax but perform their searches in different directions • “V” = Vertical and this function works by searching down columns • “H” = Horizontal and this function works by searching across rows © Tim Ward 2009 – all rights reserved
  • 34. Lookup and Reference Functions VLOOKUP • Data must be arranged in columns • =VLOOKUP(What,Where,Return,Match_Type) • Where = the range containing the data • The values for “What” must be in the first Column • What = the value to be looked up in the first column of “Where” • Return = the column in the “Where” range that contains the values to be returned • Match_Type = the type of match required • 0 = an exact match (not case sensitive), Returns “#N/A” if no match is found • 1 = the closest match that is less than or equal to the What value (1st column of “Where” must be in ascending order) © Tim Ward 2009 – all rights reserved
  • 35. Lookup and Reference Functions HLOOKUP • Data must be arranged in Rows • =HLOOKUP(What,Where,Return,Match_Type) • Where = the range containing the data • The values for “What” must be in the first Row • What = the value to be looked up in the first row of “Where” • Return = the row in the “Where” range that contains the values to be returned • Match_Type = the type of match required • 0 = an exact match (not case sensitive), Returns “#N/A” if no match is found • 1 = the closest match that is less than or equal to the What value (1st column of “Where” must be in ascending order) © Tim Ward 2009 – all rights reserved
  • 36. Lookup and Reference Functions • =MATCH(What,Where,Match_Type) • Use on single row or column • Returns the number of the row or column where the match is found • What = the value to be looked up • Where = the range to do the lookup in • Match_Type = the type of match required • -1 - finds the smallest value that is greater than or equal to “What”. “Where” must be placed in descending order • 0 - finds the first value that is exactly equal to “What”. “Where” can be in any order. Returns “#N/A” if no match is found • 1 - finds the largest value that is less than or equal to “What”. “Where” must be placed in ascending order © Tim Ward 2009 – all rights reserved
  • 37. Lookup and Reference Functions • =INDEX(RANGE,Row_No,Column_No) • Returns the value at the intersection of the Row_No and Column_No in the RANGE • Like coordinates in Maths • Much faster than lookup as no searching • Combine with “Match” – error trapped lookups, efficient multi column return • Combine with SUM to allow formula to cope with increasing periods etc © Tim Ward 2009 – all rights reserved
  • 38. Lookup and Reference Functions • =ROW() • Returns the number of the row the cell is in • =COLUMN() • Returns the number of the column the cell is in • Sometimes useful in calculations • e.g. January is in column E (or 5), Feb in F etc. • If you need to use the month in the formula in a column then COLUMN()-4 gives this. © Tim Ward 2009 – all rights reserved
  • 39. Lookup and Reference Functions • =OFFSET(Reference,Row_Down,Column_Across) • Returns the value in the cell x Row_Down and y Column_Across from the Reference • Useful alternative to index if selecting values from a table where you need both rows and columns to be variable © Tim Ward 2009 – all rights reserved
  • 40. IF Statements • If statements let a formula return different values or perform different calculations depending on the result of a logical test • A logical test is any expression that can be evaluated as TRUE or FALSE • Black = White is a logical test and would return FALSE • Age >= 21 is a logical test which would return true if the value for Age was greater than or equal to 21 © Tim Ward 2009 – all rights reserved
  • 41. IF Statements • =IF(Expr,Value_If_True,Value_If_False) • Expr is the logical test • Value_If_True is the result if Expr evaluates to true • Value_If_False is the result if Expr evaluates to false © Tim Ward 2009 – all rights reserved
  • 42. IF Statements • Sometimes the result of an IF statement depends on more than one Logical Test • OR and AND Expressions can be used to add this functionality to an IF statement • AND(Expr1, Expr2, …, Expr30) • If all of the Expr’s evaluate to TRUE then the AND statement evaluates to TRUE otherwise it evaluates to FALSE © Tim Ward 2009 – all rights reserved
  • 43. IF Statements • OR(Expr1, Expr2, …, Expr30) • If ANY of the Expr’s evaluate to TRUE then the OR statement evaluates to TRUE © Tim Ward 2009 – all rights reserved
  • 44. Error Handling • Errors make totalling difficult and look unprofessional • Need to trap errors • Use if statement combined with: • ISERROR • ISNUMBER • ISLOGICAL • ISNA • IS… © Tim Ward 2009 – all rights reserved
  • 45. Error Handling • All “IS…” functions have the same format • Most common is “ISERROR” • =ISERROR(EXPRESSION) • Tests the value to see if it is an Excel error • #N/A, #REF, #VALUE etc • If it is an error then the formula evaluates to TRUE • If not an error then the formula evaluates to FALSE © Tim Ward 2009 – all rights reserved
  • 46. Pivot Tables • Very powerful tool – revolutionised analysis • Not great for standard reporting • Can change size and shape • Tricks for forcing standard size and shape • Data sources • External • Worksheet • Another Pivot Table • Formatting © Tim Ward 2009 – all rights reserved
  • 47. Visual Basic for Applications • Language Structure • Recording Macros • Editing Macros • Custom Functions © Tim Ward 2009 – all rights reserved
  • 48. Visual Basic for Applications • Can be used for: • Automating repetitive tasks • Guiding users with messages and dialog boxes • Restricting functionality • Designing custom menus and toolbars • Custom Functions • Structure is the same between office applications • Objects may vary © Tim Ward 2009 – all rights reserved
  • 49. Visual Basic for Applications • Language Structure • VBA is an Object Orientated Language • Almost everything in Excel is an Object • Workbooks, Worksheets, Cells • An object is a thing that you want to do something to • Objects are grouped in collections • Objects have PROPERTIES • The font size, value in a cell etc • You do things towith OBJECTS using a METHOD • Copy, Paste, Delete • The best way to start learning is to record a Macro © Tim Ward 2009 – all rights reserved
  • 50. Visual Basic For Applications • Look at the macro we just recorded • Tools > Macro > Visual Basic Editor • Make sure the project explorer is showing on the left – if not click {Ctrl}+R or go to the View menu • Look for VBA Project (My Name.xls) • Click the + sign next to it to expand the container • VBA Code is stored in a Module • Click the + sign next to the Modules folder • There should be a “Module 1” • Double Click this module © Tim Ward 2009 – all rights reserved
  • 51. Visual Basic for Applications • All macros start with the word sub followed by the macro name followed by brackets • The macro we recorded starts Sub Macro1() • All macros end with the words End Sub() • Lets look at the detail.. © Tim Ward 2009 – all rights reserved
  • 52. Visual Basic for Applications • Macro’s can be edited once you understand their structure • Reading our macro is there anything that is superfluous? • Other common edits • add a loop • Repeats the same action for a number of Worksheets or Ranges etc • Do WhileUntil… Loop • For…Next • For Each xxx in xxx … Next xxx © Tim Ward 2009 – all rights reserved
  • 53. Visual Basic for Applications • Other common edits • add a loop • Repeats the same action for a number of Worksheets or Ranges etc • Do WhileUntil… Loop • For…Next • For Each xxx in xxx … Next xxx • with xxxx • Allows many properties to be set for the same object • If ... Then … Else … End if © Tim Ward 2009 – all rights reserved
  • 54. Thanks for your time • Anything I’ve not covered? • Anything unclear? • Suggestions for improvement? © Tim Ward 2009 – all rights reserved
  • 55. Further Training and Info • Microsoft’s site full of useful courses for free • http://office.microsoft.com/en-us/training/CR0618311410 • TechNet useful for more technical help • http://technet.microsoft.com/en-gb/office/default.aspx © Tim Ward 2009 – all rights reserved