Spreadsheet Analytical Tools
Upcoming SlideShare
Loading in...5

Spreadsheet Analytical Tools



vlookup, pivot table and Macros

vlookup, pivot table and Macros



Total Views
Views on SlideShare
Embed Views



1 Embed 11

http://www.slideshare.net 11



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • Tools>Options>Macro>Security> then select the security level you want to use. In the Macro name box, enter a name for the macro 3. Notes The first character of the macro name must be a letter. Other characters can be letters, numbers, or underscore characters. Spaces are not allowed in a macro name; an underscore character works well as a word separator. Do not use a macro name that is also a cell reference or you can get an error message that the macro name is not valid. 4. If you want to run the macro by pressing a keyboard shortcut key (shortcut key: A function key or key combination, such as F5 or CTRL+A, that you use to carry out a menu command. In contrast, an access key is a key combination, such as ALT+F, that moves the focus to a menu, command, or control.), enter a letter in the Shortcut key box. You can use CTRL+ letter (for lowercase letters) or CTRL+SHIFT+ letter (for uppercase letters), where letter is any letter key on the keyboard. The shortcut key letter you use cannot be a number or special character such as @ or #. Note   The shortcut key will override any equivalent default Microsoft Excel shortcut keys while the workbook that contains the macro is open. 5. In the Store macro in box, click the location where you want to store the macro. If you want a macro to be available whenever you use Excel, select Personal Macro Workbook . If you want to include a description of the macro, type it in the Description box. Click OK .
  • If you want to run the macro from the module window, press F5. When you're finished writing your macro, click Close and Return to Microsoft Excel on the File menu. Tip You can view your Personal Macro Workbook file (Personal.xls) at any time by opening it in the Visual Basic Editor (Visual Basic Editor: An environment in which you write new and edit existing Visual Basic for Applications code and procedures. The Visual Basic Editor contains a complete debugging toolset for finding syntax, run-time, and logic problems in your code.) (Alt+F11). Because Personal.xls is a hidden workbook that is always open, you must unhide it if you want to copy a macro.
  • lookup_value: Contains the address of the cell that contains the value you want to look up in the table_array range. table_array: Contains the data's cell range. The values in the first column of table_array must be in ascending sort order, otherwise VLOOKUP may not return the correct value. col_index_num: Contains the column in which the retrieved value can be found. range_lookup: (Optional) A logical value that determines which type of search to perform. If you use the TRUE value or leave the argument blank, the function looks for the closest match to the value you seek. If you use FALSE, the function returns only an exact value. The lookup range must not include the column headings. If the value of range_lookup is FALSE and lookup_value column is formatted for text, you can use the wildcard characters -- question mark (?) and asterisk (*) -- in the lookup_value argument. A question mark matches any single character; an System sluggish? If you find that running Excel along with your other applications causes your old system to slow down, it may be time to invest in a new PC. » HP 5000 series desktop PCs » Desktop buying guide asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.

Spreadsheet Analytical Tools Spreadsheet Analytical Tools Presentation Transcript

  • Spreadsheet Practical Analytical Tools A Strategic Approach to Spreadsheet Analysis An overview of Macros, Pivot Tables and VLOOKUP By Joselito Pérez
  • Presentation Overview
    • Introduction
      • Overview of Tools
    • Macros
    • Pivot Table
    • VLOOKUP()
    • Practice Exercise
    Slide A. Introduction E. Practice D . VLOOKUP C . Pivot Tables B . Macros
  • Overview: Tools
    • Macros – a series of command recorded or created in order to automate a task.
    • Pivot Table – a dynamic summary report of your data in which you can change the position of fields. Pivot tables are useful to analyze big databases.
    • VLOOKUP() – is a function that returns the value in a given column that matches a value in the left most column of a table.
    Slide A. Introduction
  • Macros
    • What is a Macros?
      • An action or a set of actions you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language (VBS).
      • These macros run completely within Excel and require no additional software.
      • After knowing a few codes you can create your own macros.
    Slide B . Macros
  • Macros
    • How do Macros works?
      • Macros record all the key strokes and commands and set codes in the VBA (Visual Basic Editor).
      • Macro Recorder is the easiest way to quickly automate your tasks.
      • The Macro Recorder does all the code writing in the background without you actually coming in contact with any code.
      • Once you create a macro you can either run it, modify it or delete it.
    Slide B . Macros
  • Macros
    • What is the VBA?
      • The term VBA is short for Visual Basic for Applications and is the name of the programming language used to represent the commands.
      • This window provides a dedicated environment where you can edit and write VBA code. This window can be displayed by selecting (Tools > Macro > Visual Basic Editor) .
    Slide B . Macros
  • Recording a Macro
    • Because Macro requires Excel to be program, the security level needs to be set to Medium.
    • Select (Tools > Macro > Record New Macro) to display the Record Macro dialog box.
    Slide B . Macros
  • Recording a Macro
    • A floating toolbar with the Stop Recording button will appear to indicate that macro is recording.
    • Relative vs. Absolute f you want the macro to run relative to the position of the active cell, record it using relative cell references. On the Stop Recording toolbar, click Relative Reference
    • Carry out the actions you want to record.
    • Click Stop Recording when done recording the task.
    Slide B . Macros
  • Creating a Macro
    • Select (Tools > Macro > Macros) to display the Macros dialog box.
    • The Visual Basic for Applications window will be opened automatically.
    • You will see that a code module has been added to the active workbook.
    • Type or copy your code into the code window of the module.
    • Then select (File > Save) to save the macro in that workbook.
    Slide B . Macros
  • Useful Macros
    • Change Number format
    • Selection.NumberFormat = "$#,##0.00"
    • Range("I2").Select
    • Selection.NumberFormat = "m/d/yyyy"
    • Range("I3").Select
    • Selection.NumberFormat = "@"
    • Range("I1").Select
    • Selection.NumberFormat = "General"
    • Range(“I1”).Select
    • Selection.NumberFormat = ”Number”
    • Columns("J:O").Select
    • Selection.Style = "Comma"
    • End Sub
    • InputBox
    • Range(“A1”).Select
    • ActiveCell.Value = InputBox("Text")
    • End Sub
    • Add Value with Name Reference and Input Box
    • Range("D5").Select
    • ActiveCell.Value = "=" + InputBox("Enter Tax") + "-Gardner"
    • End Sub
    Slide B . Macros
  • Pivot Table
    • You create a pivot table report by selecting (Data > PivotTable and PivotChart Wizard) .
    • Select any cell within the list from which you want to create your table.
    • You can use pivot tables to aggregate data from a wide range of sources including external databases.
    • There are four places you can use for the data for your pivot table
      • A list or database table in Excel. The excel data must be arranged in the correct way to get the maximum benefit.
      • An external source, database or another workbook
      • A consolidation of multiple ranges from different worksheets.
      • Another Pivot Table or Pivot Chart.
    Slide C . Pivot Table
  • VLOOKUP() Slide The function VLOOKUP() is a function that performs a vertical lookup for a value in the first column of the array. lookup_value The value to be found in the first column of the array.   table_array The cell range or a range name containing the table of data.  col_index_num The column number for the value you want returned.   range_lookup (optional) True or False to specify whether to find an approximate or exact match. D . VLOOKUP
  • Practice Exercises
    • Record a macro:
      • Change the Page Setup to Landscape.
      • Change the margins to .5 inches.
      • Change the font to Bell MT.
    • Create a macro:
      • Create and input box for expense report.
      • Create a macro to Fit columns.
    • Create a Pivot table from Tuition Payment Data.
      • Change the row to data and Data to rows.
      • Change rows to columns.
      • Change names to row.
    • Perform a vlookup for Exercise vlookup 1.
      • Find revenue of item T2562.
      • Find quantity order of item T3391.
    Slide E. Practice
  • Practice Exercises Slide E. Practice
  • Slide