12
Spreadsheet Practical Analytical Tools Spreadsheet Practical Analytical Tools A Strategic Approach to Spreadsheet Analysis An overview of Macros, Pivot Tables and VLOOKUP By Joselito Pérez

Spreadsheet Analytical Tools

Embed Size (px)

DESCRIPTION

vlookup, pivot table and Macros

Citation preview

Page 1: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Spreadsheet Practical Analytical Tools

A Strategic Approach to Spreadsheet Analysis

An overview of Macros, Pivot Tables and VLOOKUP

ByJoselito Pérez

Page 2: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 2

Presentation Overview

A.Introduction• Overview of Tools

B.Macros

C.Pivot Table

D.VLOOKUP()

E.Practice Exercise

A. Introduction

E. Practice

D. VLOOKUP

C. Pivot Tables

B. Macros

Page 3: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 3

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.

A. Introduction

Page 4: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 4

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.

B. Macros

Page 5: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 5

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.

B. Macros

Page 6: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 6

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).

B. Macros

Page 7: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 7

Recording a Macro1. Because Macro requires Excel to be program, the

security level needs to be set to Medium.

2. Select (Tools > Macro > Record New Macro) to display the Record Macro dialog box.

B. Macros

Page 8: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 8

Recording a Macro

3. A floating toolbar with the Stop Recording button will appear to indicate that macro is recording.

4. 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

5. Carry out the actions you want to record.

6. Click Stop Recording when done recording the task.

B. Macros

Page 9: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 9

Creating a Macro1. Select (Tools > Macro > Macros)

to display the Macros dialog box.

2. The Visual Basic for Applications window will be opened automatically.

3. You will see that a code module has been added to the active workbook.

4. Type or copy your code into the code window of the module.

5. Then select (File > Save) to save the macro in that workbook.

B. Macros

Page 10: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 10

Useful MacrosChange 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 SubAdd Value with Name Reference

and Input BoxRange("D5").SelectActiveCell.Value = "=" +

InputBox("Enter Tax") + "-Gardner"

End Sub

B. Macros

Page 11: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 13

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.

E. Practice

Page 12: Spreadsheet Analytical Tools

Spreadsheet Practical Analytical Tools

Slide 15