情報基礎 A Lecture 15 Takeshi Tokuyama Tohoku University Graduate School of Information Sciences System Information Sciences Design and Analysis of Information.

Slides:



Advertisements
Similar presentations
Data Analysis using SPSS By Dr. Shaik Shaffi Ahamed Ph. D
Advertisements

1 Overview Introduction to VBA The Visual Basic Editor (VBE) –First Program Getting Started with VBA –Subroutines –Declaring variables –Input boxes and.
© NHS Institute for Innovation and Improvement, 2012 Baseline Data Collection Guide for Project Managers and Facilitators updated Feb 2012.
How to Import an Excel File Using the SAS Import Wizard SAS 9 for Windows.
Tools of the Trade: An Introduction to SPSS Presenter: Michael Duggan, Suffolk University
Information literacy B Lecture 4 Database and Spreadsheet Takeshi Tokuyama Tohoku University Graduate School of Information Sciences System Information.
Excel 2007 Graphs & Charts. TYPES OF CHARTS Column Bar Pie Line.
Excel and Visual Basic. Outline Data exchange between Excel and Visual Basic. Programming VB in Excel.
情報基礎 B Lecture 5 Takeshi Tokuyama Tohoku University Graduate School of Information Sciences System Information Sciences Design and Analysis of Information.
情報基礎 A Lecture 10 Takeshi Tokuyama Tohoku University Graduate School of Information Sciences System Information Sciences Design and Analysis of Information.
Object Oriented Programming A programming concept which views programs as objects with properties and ways to manipulate the object and the properties.
Modeling using VBA. Covered materials -Userforms -Controls -Module -Procedures & Functions -Variables -Scope.
EXCEL VBA 101 Current Status Waiting Using Excel/VBA to Speed-up Daily Data Processing An Introduction to VBA Yongjun Chen Click Me to Start …
Week 10.  Protecting Code  Protecting Worksheets  Error Handling  Charts.
With Microsoft Excel 2007 Comprehensive 1e© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Excel 2007 Comprehensive.
Excel Tutorial 6 Managing Multiple Worksheets and Workbooks
Object Linking and Embedding Objective 6.02 Linking and Embedding.
Example: Correlation Part 1: Use Tools > Data Analysis Part 2: Use Insert Function f x Issue: The company wants to analyze the relationship between salary.
ISOM3230 Business Applications Programming VBA Business Applications Implementing Formulas.
Spreadsheets and Non- Spatial Databases Unit 4: Module 15, Lecture 2- Advanced Microsoft Excel.
Saving and Preparing School Finance Data from GEMS Expenditures Paul Taylor, OPI School Finance.
Homework #1Score____________ Text Exercise 1.2 (a) (b) (Also classify those variables which are qualitative as dichotomous, nominal, or ordinal, and classify.
1 CA202 Spreadsheet Application Working with Other Microsoft Office Programs Lecture # 13 Dammam Community College.
Overview of Excel Object Model ISYS 562. Excel’s Database Tools Lookup and Database functions: –VLookUp, D functions Data –Sort –Filter –Subtotals –Pivot.
Introduction to Spreadsheets Presented by Frank H. Osborne, Ph. D. © 2005 Bio 2900 Computer Applications in Biology.
VBA Programming Session #2. Things to Review  Variables  Procedures: Subs & Functions  If…Then  For…Next.
Working with Charts ISYS 562. Chart Locations As an embedded object on a worksheet: –Worksheet ChartObjects –ChartObject: A container for a chart »Chart.
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily quiz will be given at the.
Chapter 3 Interactivity and Expressions CSC 125 Introduction to C++ programming.
Creating Macros Using VBA. Assigning a Macro to a Button Display the Forms toolbar. Click the Button icon. Click and drag the mouse pointer to specify.
Introduction to Applets CS 3505 Client Side Scripting with applets.
情報基礎 B Lecture 8 Takeshi Tokuyama Tohoku University Graduate School of Information Sciences System Information Sciences Design and Analysis of Information.
Learning the TSP: a guide for students at the 国際総合学類筑波大学 For the following classes of Professor Tadashi Yamada: MicroeconomicsStatistics Human Resources.
Social Science Research Design and Statistics, 2/e Alfred P. Rovai, Jason D. Baker, and Michael K. Ponton Splitting Files PowerPoint Prepared by Alfred.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
ME 142 Engineering Computation I Exam 2 Review VBA.
How to create a line graph using Excel Spreadsheet.
Pascal Programming Today Chapter 11 1 Chapter 11.
Chapter 11: Introduction to VBA Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Intermacs Form Download Excel Tutorial Pivot Tables, Graphic Tools, Macros By: Devin Koehl.
Introduction to Excel VBA UNC Charlotte CPE/PDH Series December 17, 2009.
Reliability, Validity and Fit. Functional Independence Measure (FIM): Example 17s  In Example 17, 35 arthritis patients have been through rehabilitation.
Intermacs Form Download Excel Tutorial Pivot Tables, Graphic Tools, Macros By: Devin Koehl.
Workshop 3: Data Import. Importing data Normally, data to be imported into Excel work sheet are available as: - Excel work sheet file (.XLS) - Public.
情報基礎 A Lecture 9 Takeshi Tokuyama ・ Jinhee Chun Tohoku University Graduate School of Information Sciences System Information Sciences Design and Analysis.
Google Merchant Center Feed Process Manohar Bennuri.
Human Body Systems – The Circulatory System Using Excel and Microsoft Word iLearn Science Session 4.
Using SPSS Note: The use of another statistical package such as Minitab is similar to using SPSS.
How to Work With SURN Principal Academy Data For data downloaded from onlineobservationtools.com.
Lesson 9: Using What if Analysis Justin Siddiqi, Jacob Manera, Michael Moreno.
Chapter 15: Sub Procedures and Function Procedures Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Microsoft Project – Tutorial 6 Working with Excel as Microsoft Project uses many sheets for entering and working with data, it is fairly easy to import.
情報基礎 A Lecture 12 Takeshi Tokuyama Tohoku University Graduate School of Information Sciences System Information Sciences Design and Analysis of Information.
Macros in Excel Using VBA Time Required – 5 hours.
Lecture 6 – Working with VBA Sub Procedures Dr Joanna Wyrobek 1.
Guidelines for building a bar graph in Excel and using it in a laboratory report IB Biology (December 2012)
Spreadsheet-Based Decision Support Systems
Microsoft Excel Basic Skills
Open Office Calc Session 01 Class Management Report
SCIENCE SKILLS : SPREADSHEETS
PSYC 354 Enthusiastic Studysnaptutorial.com
Visual Basic for Applications in Microsoft Excel (1)
SCIENCE SKILLS : SPREADSHEETS
Pivot Tables= impromptu data reports for student grade data
Excel – VBA – How to use Non-Contiguous range of cells
情報基礎B   Lecture 7 Takeshi Tokuyama Tohoku University Graduate School of Information Sciences System Information Sciences Design and Analysis of Information.
情報基礎B   Lecture 6 Takeshi Tokuyama Tohoku University Graduate School of Information Sciences System Information Sciences Design and Analysis of Information.
Using SPSS Note: The use of another statistical package such as Minitab is similar to using SPSS.
Microsoft Excel Done by : Suaad Mohamed.
Reliability, Validity and Fit
Presentation transcript:

情報基礎 A Lecture 15 Takeshi Tokuyama Tohoku University Graduate School of Information Sciences System Information Sciences Design and Analysis of Information Systems

Programming VBA Data Processing plus

Chart Insertion 1Sub chart() 2 3 Worksheets(“Statistics”).Activate 4 5 Charts.Add 6 ActiveChart.ChartType = xlColumnStacked100 7 ActiveChart.SetSourceData Source := Sheets(“Statistics”).Range(“A2:G8”), PlotBy := xlRows 8 ActiveChart.Location Where := xlLocationAsObject, Name := “Statistics" 9End Sub

Procedure Call Calling procedure from different procedure –Procedure already written Sub sum_ave_6sub() Sub grade_6sub() Sub student_ave() Sub stat_pass_fail() Sub stat_grade() Sub chart() –Instead of executing each procedure, write a new procedure to call all of them

Procedure Call Write procedures to execute in Sub score() – Call “Procedure name” Six procedures are executed in order 1Sub score() 2 3 Call sum_ave_6sub 4 Call grade_6sub 5 Call student_ave 6 Call stat_pass_fail 7 Call stat_grade 8 Call chart 9 10End Sub

Process 20 files at once

Preparation Download “hogehoge”

20 Data File and Statistics File

Exercise Score data processing for 20 classes –Execute six process below for each file Sub sum_ave_6sub() Sub grade_6sub() Sub student_ave() Sub stat_pass_fail() Sub stat_grade() Sub chart() –Procedure name: score() Output statistics of 20 classes into score.xls

File Operation Open method Open 20 files in order –Utilize number in filename as a variable Save and close active file 1Workbooks.Open Filename := “class1.xls” 1For i= a To 20 2 Workbooks.Open Filename := “class” & i & “.xls” 3Next i 1ActiveWorkbook.Save 2ActiveWindow.Close

Accessing the other file: Copy data to a file Copy the number of student who got “A” for Japanese on sheet “Statistics” to score.xls- >sheet:2011->Japanese->A –Copy a cell B4 on sheet “Statistics” of active file to a cell B3 on score.xls 1 Workbooks("seiseki.xls").Worksheets(" 平成 21 年 ").Cells(3, 2) = Worksheets(" 統計 ").Cells(4, 2)

1 Sub score() 2 Dim i As Integer 3 Dim m As Integer 4 Dim n As Integer 5 Dim x As Integer 6 Workbooks.Open 7 Filename:=“\\netsrv22\c90a1rlu\MyDocuments\foo\bar\baz.xls" 8 For i = 1 To 20 9 Workbooks.Open Filename:="\\netsrv22\c90a1rlu\MyDocuments\foo\bar\class" & i & ".xls" 10 Call goukei_6kamoku 11 Call hyouka_6kamoku 12 Call kojin_heikin 13 Call toukei_gouhi 14 Call toukei_hyoka 15 Call graph 16 Workbooks(“baz.xls").Worksheets(“2011”).Cells(52, i + 1) = Worksheets(“Statistics”).Cells(12, 2) 17 Workbooks(“baz.xls").Worksheets(“2011”).Cells(53, i + 1) = Worksheets(“Statistics”).Cells(13, 2) 18 x = 0 19 For m = 1 To 6 20 For n = 2 To 6 21 Workbooks("seiseki.xls").Worksheets(“2011").Cells(n+1+x,i+1)=Worksheets(“Statistics").Cells(n+2,m+1) 22 Next n 23 x = x Next m 25 ActiveWorkbook.Save 26 ActiveWindow.Close 27 Next i 28 Workbooks("seiseki.xls").Save 29 End Sub

\\netsrv22\c90a1rlu\MyDocuments\foo \ bar\baz.xls Copy a path

Submit