Excel for Chemists. Second Edition

Similar documents
This page intentionally left blank

Table of Contents. Chapter 1

Excel for Dummies: Quick Reference

Welcome to Microsoft Excel 2013 p. 1 Customizing the QAT p. 5 Customizing the Ribbon Control p. 6 The Worksheet p. 6 Excel 2013 Specifications and

HOW TO USE THIS BOOK... V 1 GETTING STARTED... 2

EVALUATION ONLY. Table of Contents. iv Labyrinth Learning

Microsoft Certified Application Specialist Exam Objectives Map

Appendix A Microsoft Office Specialist exam objectives

Microsoft Office Excel 2013 Courses 24 Hours

Copyright & License Notes 3 Introduction 13 Chapter 1 - Excel Basics 14. Chapter 2 - Working with Data 32

Excel Basic 1 GETTING ACQUAINTED WITH THE ENVIRONMENT 2 INTEGRATION WITH OFFICE EDITING FILES 4 EDITING A WORKBOOK. 1.

Microsoft Office Excel 2007: Basic. Course Overview. Course Length: 1 Day. Course Overview

Microsoft Excel Training Master Topic List

Reference and Style Guide for Microsoft Excel

SAS (Statistical Analysis Software/System)

Table of Contents COPYRIGHTED MATERIAL. Introduction Book I: Excel Basics Chapter 1: The Excel 2013 User Experience...

for Scientists and Engineers. Numerical Methods

PTC Mathcad Prime 3.0

Excel 2003 Tutorials - Video File Attributes

Scientific Graphing in Excel 2013

Creating a Spreadsheet by Using Excel

SAS (Statistical Analysis Software/System)

Excel 2007 Tutorials - Video File Attributes

Open and arrange windows This section covers items like: Opening another window on to a workbook Arranging workbook windows Hiding and show windows

Appendix A. HINTS WHEN USING EXCEL w

Scientific Graphing in Excel 2007

Learning Map Excel 2007

Themes & Templates Applying a theme Customizing a theme Creatingfilefromtemplate Creating yourowncustomize Template Using templates Editing templates

Excel 2010 Tutorials - Video File Attributes

The Microsoft Excel Course is divided into 4 levels

Working with Microsoft Excel. Touring Excel. Selecting Data. Presented by: Brian Pearson

SAS (Statistical Analysis Software/System)

Excel Tutorials - File Size & Duration

Chapter 1: Excel in a Nutshell 3 Chapter 2: Basic Facts about Formulas 33 Chapter 3: Working with Names 59

Chapter 3: Rate Laws Excel Tutorial on Fitting logarithmic data

Syllabus KCXXXXXX: Excel Level I, Version 2010

for Scientists and Engineers Numerical Methods E. Joseph Bill0 WILEY-INTERSCIENCE A John Wiley & Sons, Inc., Publication BICENTENNIAL

Which Excel course is right for me?

Table of Contents. Word. Using the mouse wheel 39 Moving the insertion point using the keyboard 40 Resume reading 41

Excel Boot Camp PIONEER TRAINING, INC.

EXCEL 2016 SERIES AT NORTH SEATTLE COLLEGE

SUM - This says to add together cells F28 through F35. Notice that it will show your result is


Excel Scientific and Engineering Cookbook

COMP1000 / Spreadsheets Week 2 Review

EXCEL 2010 PROCEDURES

Computer Training That Makes The Difference

All Excel Topics Page 1 of 11

Microsoft Excel 2016 / 2013 Basic & Intermediate

TABLE OF CONTENTS. i Excel 2016 Advanced. 1 INTRODUCTION Method Software and other settings Exercise files 2

EXCEL 2003 DISCLAIMER:

Learning Microsoft Excel Module 1 Contents. Chapter 1: Introduction to Microsoft Excel

Microsoft Excel 2010 Level 1

Acknowledgements About the Author Starting off on the Right Foot p. 1 Basic Terminology p. 2 Title Bar p. 3 Menu Bar p. 3 Active Cell p.

Data Should Not be a Four Letter Word Microsoft Excel QUICK TOUR

Microsoft Excel 2016 Level 1

EXCEL 98 TUTORIAL Chemistry C2407 fall 1998 Andy Eng, Columbia University 1998

Excel Course Outline

Microsoft Office Excel 2010: Basic. Course Overview. Course Length: 1 Day. Course Overview

2013 FOUNDATION MANUAL

Excel 2016: Core Data Analysis, Manipulation, and Presentation; Exam

Spreadsheet Techniques and Problem Solving for ChEs

1.1 Opening/Closing the file The first step to using Excel is launching the program and knowing how to close it when you re finished.

Microsoft How to Series

Extracting the last word of a string Extracting all but the first word of a string Extracting first names, middle names, and last names Counting the

Learning Microsoft Excel Module 1 Contents. Chapter 1: Introduction to Microsoft Excel

Microsoft Excel 2010 Tutorial

MS Excel 1 Day Seminar Catalogue

Microsoft Excel training course

Excel Select a template category in the Office.com Templates section. 5. Click the Download button.

Beginning Microsoft Office 2010

Excel 2016 Essentials Syllabus

Free Microsoft Office 2010 training from MedCerts. Course Outline

Excel Level 1: Beginner. Get started in Excel. Look good with easy formatting. Set out your first Excel calculations. Increase your efficiency

Exploring Microsoft Office Excel 2007

Microsoft Excel 2016 Training Programme

The American University in Cairo. Academic Computing Services. Excel prepared by. Maha Amer

Excel 2013 Essentials Syllabus

Office Applications II Lesson Objectives

Mobile MOUSe EXCEL 2010 ONLINE COURSE OUTLINE

Microsoft Word for Report-Writing (2016 Version)

Excel Basics. TJ McKeon

I, J. text boxes, 51 Word, Excel and PowerPoint, Gridlines, 155, ,

Microsoft Excel Important Notice

Using Excel for Graphical Analysis of Data

Starting Excel application

Spreadsheet Applications Test

Real-Time Optimization by Extremum-Seeking Control

Excel 101. DJ Wetzel Director of Financial Aid Greenville Technical College

OTEC 1822 Microsoft Excel

Practical File Answer key Class X (402)

Excel 2010 ALL-IN-ONE FOR DUMHIE5* by Greg Harvey TECHN1SCHE INFORMATIONSBIBUOTHEK UN1VERSITATSBIBLIOTMEK HANNOVER WILEY. Wiley Publishing, Inc.

Spreadsheet Techniques and Problem Solving for ChEs

Excel Main Screen. Fundamental Concepts. General Keyboard Shortcuts Open a workbook Create New Save Preview and Print Close a Workbook

Contents. Excel 2013 Workbook... 1 Starting Excel The Startup Screen... 3 The Excel Screen... 4 Quick Access Toolbar...

2013 ADVANCED MANUAL

Spreadsheet Software

TABLE OF CONTENTS. i Excel 2016 Basic

Index. calculated columns in tables, switching on, 58 calculation options (manual and automatic), 132 case sensitive filter, implementing, 37

Corporate essentials

Transcription:

Excel for Chemists Second Edition

This page intentionally left blank

ExceL for Chemists A Comprehensive Guide Second Edition E. Joseph Billo Department of Chemistry Boston College Chestnut Hill, Massachusetts New York Chichester Weinheim Brisbane Singapore Toronto

Disclaimer: This ebook does not include the ancillary media that was packaged with the original printed version of the book. This text is printed on acid-free paper. ^9 Trademarks: Macintosh is a registered trademark of Apple Computer, Inc. Windows is a registered trademark of Microsoft Corporation. Copyright 2001 by John Wiley & Sons, Inc. All rights reserved. Published simultaneously in Canada. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearatnce Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4744. Requests to the Publisher for permission should be addressed to the Permission Department, John Wiley & Sons, Inc., 605 Third Avenue, New York, NY 10158-0012, (212) 850-6011, fax (212) 850-6008, E-Mail: PERMREQ@WILEY.COM. For ordering and customer service, call 1-800-CALL-WILEY. Library of Congress Cataloging-in-Publication Data: Billo, E. Joseph. Excel for chemists : a comprehensive guide / E. Joseph Billo. 2 nd ed. p. cm. Includes bibliographical references and index. ISBN 0-471-39462-9 (pbk.: acid-free paper) 1. Electronic spreadsheets. 2. Chemistry Data processing. 3. Microsoft Excel (Computer file) I. Title. QD39.3.S67 B55 2001 542'.85'5369 dc21 2001024022 Printed in the United States of America. 10 9876543

SUMMARY OF CONTENTS Preface Preface to the First Edition Before You Begin xix xxi xxiii PART I THE BASICS Chapter 1 Working with Excel 3 Chapter 2 Creating Charts: An Introduction 47 PART II ADVANCED SPREADSHEET TOPICS Chapter 3 Creating Advanced Worksheet Formulas 59 Chapter 4 Creating Array Formulas 91 Chapters Advanced Charting Techniques 109 Chapter 6 Using Excel's Database Features 133 Chapter 7 Importing Data into Excel 147 Chapter 8 Adding Controls to a Spreadsheet 159 PART III SPREADSHEET MATHEMATICS Chapter 9 Some Mathematical Tools For Spreadsheet Calculations 169 Chapter 10 Graphical and Numerical Methods of Analysis 193 Chapter 11 Linear Regression 207 Chapter 12 Non-Linear Regression Using the Solver 223 PART IV EXCEL VISUAL BASIC MACROS Chapter 13 Visual Basic for Applications: An Introduction 241 Chapter 14 Programming with VBA 251 Chapter 15 Working with Arrays in VBA 279 Chapter 16 Creating Command Macros 291 Chapter 17 Creating Custom Functions 299 Chapter 18 Creating Custom Menus and Menu Bars 309 Chapter 19 Creating Custom Toolbuttons and Toolbars 317 PART V SOME APPLICATIONS Chapter 20 Analysis of Solution Equilibria 329 Chapter 21 Analysis of Spectrophotometric Data 339 Chapter 22 Calculation of Binding Constants 349 Chapter 23 Analysis of Kinetics Data 373 PART VI APPENDICES Appendix A Selected Worksheet Functions by Category 391 Appendix B Alphabetical List of Selected Worksheet Functions 397 Appendix C Selected Visual Basic Keywords by Category 417 Appendix D Alphabetical List of Selected Visual Basic Keywords 421 Appendix E Shortcut Keys for PC and Macintosh 441 Appendix F Selected Shortcut Keys by Category 457 Appendix G About the CD-ROM That Accompanies This Book 463 INDEX 469 v

This page intentionally left blank

CONTENTS Preface Preface to the First Edition Before You Begin xix xxi xxiii PARTI: THE BASICS 1 Chapter 1 Working with Excel 3 The Excel Document Window 3 Changing What Excel Displays 4 Moving or Re-Sizing Documents (Windows) 5 Moving or Re-Sizing Documents (Macintosh) 5 Navigating Around the Workbook 5 Selecting Multiple Worksheets 6 Changing Worksheet Names 6 Rearranging the Order of Sheets in a Workbook 6 Navigating Around the Worksheet 7 Selecting a Range of Cells on the Worksheet 7 Selecting Non-Adjacent Ranges 8 Selecting a Block of Cells 8 Entering Data in a Worksheet 9 Entering Numbers 10 How Excel Stores and Displays Numbers 10 Entering Text 11 Entering Formulas 11 Adding a Text Box 12 Entering a Cell Comment 12 Editing Cell Entries 13 Excel's Menus: An Overview 13 Shortcut Menus 15 Menu Commands or Toolbuttons? 15 Opening, Closing and Saving Documents 15 Opening or Creating Workbooks 15 Using Move, Copy or Delete Sheet 16 Using Close or Exit/Quit 16 Using Save or Save As 16 The Types of Excel Document 17 Using Save Workspace 17 Printing Documents 18 vii

viii Excel for Chemists Using Page Setup 18 Using Print Preview 19 Using Print 19 Printing a Selected Range of Cells in a Worksheet 20 Printing Row or Column Headings for a Multi-Page Worksheet 21 Editing a Worksheet 21 Inserting or Deleting Rows or Columns 21 Using Cut, Copy and Paste 22 Using Paste Special 22 Using Paste Special to Transpose Rows and Columns 23 Using Clear 24 Using Insert 24 To Copy, Cut or Paste Using Drag-and-Drop Editing 24 Duplicating Values or Formulas in a Range of Cells 25 Absolute, Relative and Mixed References 26 Relative References When Using Copy and Cut 27 Using AutoFill to Fill Down or Fill Right 27 Using AutoFill to Create a Series 28 Formatting Worksheets 29 Using Column Width and Row Height 29 Using Alignment 30 Using Font 31 The Alternate Character Set 32 Entering Subscripts and Superscripts 33 Using Border and Patterns 33 Using the Format Painter Toolbutton 34 Number Formatting 35 Using Excel's Built-in Number Formats 35 Custom Number Formats 36 Variable Number Formats 38 Conditional Number Formats 38 Using the Number Formatting Toolbuttons 39 Formatting Numbers Using "Precision as Displayed" 39 Protecting Data in Worksheets 40 Using Protection 40 Protecting a Workbook by Making it Read-Only 40 Controlling the Way Documents Are Displayed 41 Viewing Several Worksheets at the Same Time 41 Using New Window and Arrange 41 Different Views of the Same Worksheet 42 Using New Window 43 Using Split 43 Using Freeze Panes 44 Copying from Excel to Microsoft Word 44 Using Copy and Paste 45

Contents ix Making a "Screen Shot" (Macintosh) 45 Making a "Screen Shot" (Windows) 46 Useful References 46 Chapter 2 Creating Charts: An Introduction 47 Only One Chart Type Is Useful for Chemists 47 Creating a Chart 47 Creating a Chart Using the ChartWizard 47 Activating, Resizing and Moving an Embedded Chart 50 Formatting Charts: An Introduction 50 Using the Chart Menu 50 Using Chart Type... to Switch From One Chart Type to Another 51 Using Chart Options... to Add Titles, Gridlines or a Legend 51 Using Location... to Move or Copy an Embedded Chart 51 Formatting the Elements of a Chart 51 Selecting Chart Elements 52 Formatting Chart Elements 52 PART II: ADVANCED SPREADSHEET TOPICS 57 Chapter 3 Creating Advanced Worksheet Formulas 59 The Elements of a Worksheet Formula 59 Operators 59 Absolute, Relative and Mixed References 60 Creating and Using 3-D References 60 Creating and Using External References 61 Creating an External Reference by Selecting 62 Creating an External Reference by Using Paste Link 62 The External Reference Contains the Complete Directory Path 62 Updating References and Re-Establishing Links 62 Entering Worksheet Formulas 63 Using Names Instead of References 64 Using Define Name 64 Using Create Names 65 Using the Drop-Down Name List Box 67 Entering a Name in a Formula by Selecting 67 Using Apply Names 68 Using Paste Name 68 Deleting Names 68 Changing a Name 69 Names Can Be Local or Global 69 The Label... Command 70 Excel Will Create Labels Automatically 71 Worksheet Functions: An Overview 71 Function Arguments 72

x Excel for Chemists Math and Trig Functions 72 Functions for Working with Matrices 73 Statistical Functions 73 Logical Functions 73 The IF Function 73 Nested IF Functions 74 AND, OR and NOT 76 Date and Time Functions 76 Date and Time Arithmetic 78 Text Functions 78 The LEN, LEFT, RIGHT and MID Functions 78 The UPPER, LOWER and PROPER Functions 79 The FIND, SEARCH, REPLACE, SUBSTITUTE and EXACT Functions 79 The FIXED and TEXT Functions 80 The VALUE Function 81 The CODE and CHAR Functions 81 Lookup and Reference Functions 81 The VLOOKUP and HLOOKUP Functions 82 The LOOKUP Function 82 The INDEX and MATCH Functions 82 Using Wildcard Characters with MATCH, VLOOKUP or HLOOKUP 83 The OFFSET Function 83 Using Insert Function 83 A Shortcut to a Function 85 Creating "Megaformulas" 85 Troubleshooting the Worksheet 87 Error Values and Their Meanings 87 Examining Formulas 87 Finding Dependent and Precedent Cells 88 Using Paste List 88 Useful References 89 Chapter 4 Creating Array Formulas 91 Using Array Formulas 91 Array Constants 93 Editing or Deleting Arrays 94 Formulas That Return an Array Result 94 Creating a Three-Dimensional Array on a Single Worksheet 95 Evaluating Polynomials or Power Series Using Array Formulas 96 Using the ROW Function in Array Formulas 97 Using the INDIRECT Function in Array Formulas 97 Using Array Formulas to Work With Lists 97 Counting Entries in a List Using Multiple Criteria 98

Contents xi Counting Common Entries in Two Lists 99 Counting Duplicate Entries in a List 100 Counting Unique Entries in a List 101 Indicating Duplicate Entries in a List 101 Returning an Array of Unique Entries in a List 103 Using an Array Formula to Sort a 1-D List 104 Using an Array Formula to Sort a 2-D List 105 Chapter 5 Advanced Charting Techniques 109 Good Charts vs. Bad Charts 109 Charts with More Than One Data Series 110 Plotting Two Different Sets of Y Values in the Same Chart 110 Plotting Two Different Sets of X and Y Values in the Same Chart 1ll Another Way to Plot Two Different Sets of X and Y Values 112 Extending a Data Series or Adding a New Series 114 The Copy and Paste Method 114 The Drag and Drop Method 114 The Color-Coded Ranges Method 114 Using Source Data... in the Chart Menu 116 Editing the SERIES Function in the Formula Bar 116 Customizing Charts 116 Plotting Experimental Data Points and a Calculated Curve 116 Adding Error Bars to an XY Chart 118 Adding Data Labels to an XY Chart 120 Charts Suitable for Publication 121 Changing the Default Chart Format 121 Logarithmic Charts 122 3-D Charts 123 Using Excel's Built-in 3-D Chart Format 123 Charts with Secondary Axes 124 Getting Creative with Charts 126 A Chart with an Additional Axis 127 A Chart with an Inset 129 Linking Chart Text Elements to a Worksheet 130 To Switch Plotting Order in an XY Chart 131 Some Chart Specifications (Excel 2000) 132 Chapter 6 Using Excel's Database Features 133 The Structure of a List or Database 133 Sorting a List 133 Sorting According to More Than One Field 135 Sort Options 135 Using AutoFilter to Obtain a Subset of a List 136 Using Multiple Data Filters 138 Defining and Using a Database 138

xii Excel for Chemists Creating a Database 138 Defining a Database 139 Adding or Deleting Records or Fields 139 Updating a Database Using Data Form 139 Finding Records That Meet Criteria 141 Defining and Using Selection Criteria 141 Using Multiple Criteria 142 Special Criteria for Text Entries 143 Extracting Records 144 Using Database Functions 145 Chapter 7 Getting Data into Excel 147 Direct Input of Instrument Data into Excel 147 Transferring Files from Other Applications to Excel 147 Using the Text Import Wizard 147 Using Text to Columns 151 From Hard Copy (Paper) to Excel 151 Using a Scanner to Transfer Numeric Data to Excel 151 Using a Scanner to Transfer Graphical Data to Excel 154 Selecting Every Nth Data Point 154 Using AutoFill 154 Using the Sampling Tool 155 Using a Worksheet Formula 157 Chapter 8 Adding Controls to a Spreadsheet 159 You Can Add Option Buttons, Check Boxes, List Boxes and Other Controls to a Worksheet 159 How to Add a Control to a Worksheet 160 Control Properties 161 A List Box on a Worksheet 163 A Drop-down List Box on a Worksheet 163 Option Buttons and a Drop-down List Box 165 PART III: SPREADSHEET MATHEMATICS 167 Chapter 9 Some Mathematical Tools for Spreadsheet Calculations 169 Looking Up Values in Tables 169 Getting Values from a One-Way Table 169 Getting Values from a Two-Way Table 170 Interpolation Methods: Linear 171 Table Lookup with Linear Interpolation 171 Interpolation Methods: Cubic 173 Numerical Differentiation 175 First and Second Derivatives of a Data Set 175 Derivatives of a Function 178 Numerical Integration 179

Contents xii An Example: Finding the Area Under a Curve 180 Differential Equations 182 Euler's Method 183 The Runge-Kutta Methods 184 Arrays, Matrices and Determinants 186 An Introduction to Matrix Algebra 187 Polar to Cartesian Coordinates 189 Useful Reference 191 Chapter 10 Graphical and Numerical Methods of Analysis 193 Finding Roots of Equations 193 The Graphical Method 193 The Method of Successive Approximations 194 The Newton-Raphson Method 196 Solving a Problem Using Goal Seek 198 Solving a Problem by Intentional Circular Reference 201 Solving Sets of Simultaneous Linear Equations 203 Cramer's Rule 204 Solution Using Matrix Inversion 205 Chapter 11 Linear Regression 207 Least-Squares Curve Fitting 207 Least-Squares Fit to a Straight Line 208 The SLOPE, INTERCEPT and RSQ Functions 208 Linear Regression Using LINEST 209 Least-Squares Fit of y = mx + b 211 Regression Line Without an Intercept 211 Weighted Least Squares 212 Multiple Linear Regression 212 Linear Regression Using a Power Series 214 Linear Regression Using Trendline 214 Linear Regression Using the Analysis ToolPak 216 Using the Regression Statistics 218 Testing Whether an Intercept Is Significantly Different from Zero 218 Testing Whether Two Slopes Are Significantly Different 219 Testing Whether a Regression Coefficient Is Significant 220 Testing Whether Regression Coefficients Are Correlated 220 Confidence Intervals for Slope and Intercept 221 Confidence Limits and Prediction Limits for a Straight Line 221 Useful References 222 Chapter 12 Non-Linear Regression Using the Solver 223 Non-Linear Functions 223 Using the Solver to Perform Non-Linear Least-Squares Curve Fitting 224 Using the Solver for Optimization 224

xiv Excel for Chemists Using the Solver for Least-Squares Curve Fitting 224 Using the Solver: An Example 225 Comparison with a Commercial Non-Linear Least-Squares Package 230 Solver Options 231 The "Use Automatic Scaling" Option is Important for Many Chemical Problems 233 Statistics of Non-Linear Regression 233 A Macro to Provide Regression Statistics for the Solver 235 Using the SolvStat Macro 236 An Additional Benefit from Using the SolvStat Macro 237 Useful References 238 PART IV: EXCEL VISUAL BASIC MACROS 239 Chapter 13 Visual Basic for Applications: An Introduction 241 Visual Basic Procedures and Modules 241 There are Two Kinds of Macros 241 The Structure of a Sub Procedure 242 The Structure of a Function Procedure 242 The Visual Basic Editor 243 Getting Started: Using the Recorder to Create a Sub Procedure 245 The Personal Macro Workbook 247 Runninga Sub Procedure 247 Assigning a Shortcut Key to a Sub Procedure 248 Getting Started: Creating a Simple Custom Function 248 Using a Function Macro 249 Renaming a Macro 250 How Do I Save a Macro? 250 Chapter 14 Programming with VBA 251 Creating Visual Basic Code 251 Entering VBA Code 251 Making a Reference to a Cell or Range of Cells 252 Making a Reference to the Active Cell or a Selected Range of Cells 253 Making a Reference to a Cell Other Than the Active Cell 253 References Using the Union or Intersect Method 253 Getting Values from a Worksheet 254 Sending Values to a Worksheet 254 Components of Visual Basic Statements 254 Operators 254 Variables and Arguments 255 Objects, Properties and Methods 255 Objects 256 Some Useful Objects 257 "Objects" That Are Really Properties 257