Hints for formatting data in Excel spreadsheets. By Kurt Schuler 20 January 2011; revised 21 March 2013



Similar documents
Creating a Gradebook in Excel

APPLYING BENFORD'S LAW This PDF contains step-by-step instructions on how to apply Benford's law using Microsoft Excel, which is commonly used by

GUIDE FOR SORTING RX HISTORY REPORTS IN MICROSOFT EXCEL

How to Create a Data Table in Excel 2010

Using VLOOKUP to Combine Data in Microsoft Excel

Excel Tutorial. Bio 150B Excel Tutorial 1

Microsoft Excel 2010 Training. Use Excel tables to manage information

Merging Labels, Letters, and Envelopes Word 2013

WHAT S NEW IN MS EXCEL 2013

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Downloading RIT Account Analysis Reports into Excel

In-Depth Guide Advanced Spreadsheet Techniques

Drawing a histogram using Excel

Excel Reports and Macros

Computer Skills Microsoft Excel Creating Pie & Column Charts

Excel 2007 Basic knowledge

ITS Training Class Charts and PivotTables Using Excel 2007

MS Excel. Handout: Level 2. elearning Department. Copyright 2016 CMS e-learning Department. All Rights Reserved. Page 1 of 11

How to make a line graph using Excel 2007

Everyday Excel Stuff Excel Day Planner Organizer Reference Guide

How to Use a Data Spreadsheet: Excel

To launch the Microsoft Excel program, locate the Microsoft Excel icon, and double click.

Instructions for Using Excel as a Grade Book

Pulling a Random Sample from a MAXQDA Dataset

Microsoft Word 2011: Create a Table of Contents

A Quick Start Guide to Using PowerPoint For Image-based Presentations

Working with Survey of Construction Microdata in a Microsoft Excel PivotTable

What is Microsoft Excel?

Using Formulas, Functions, and Data Analysis Tools Excel 2010 Tutorial

Excel basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

Basic Formulas in Excel. Why use cell names in formulas instead of actual numbers?

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

Introduction to Microsoft Access 2013

Click on various options: Publications by Wizard Publications by Design Blank Publication

Use Mail Merge to create a form letter

Microsoft Excel 2013 Tutorial

Introduction to Microsoft Excel 2007/2010

The first thing to do is choose if you are creating a mail merge for printing or an merge for distribution over .

1. Linking among several worksheets in the same workbook 2. Linking data from one workbook to another

SPREADSHEETS. TIP! Whenever you get some new data, save it under a new name! Then if you mess things up, you can always go back to the original.

Create a Poster Using Publisher

Performing Simple Calculations Using the Status Bar

Introduction to Microsoft Excel 2010

Summary of important mathematical operations and formulas (from first tutorial):

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

HOW TO PAGE A DOCUMENT IN MICROSOFT WORD

RA MODEL VISUALIZATION WITH MICROSOFT EXCEL 2013 AND GEPHI

To add a data form to excel - you need to have the insert form table active - to make it active and add it to excel do the following:

Basic Pivot Tables. To begin your pivot table, choose Data, Pivot Table and Pivot Chart Report. 1 of 18

Lab 11: Budgeting with Excel

Using Excel to find Perimeter, Area & Volume

Microsoft Word defaults to left justified (aligned) paragraphs. This means that new lines automatically line up with the left margin.

Introduction to Microsoft Access 2007

Overview What is a PivotTable? Benefits

Excel Intermediate Session 2: Charts and Tables

Using Mail Merge in Microsoft Word 2003

Instructions for creating a data entry form in Microsoft Excel

Easy Calculations in Excel

A Guide to Using Excel in Physics Lab

Introduction to Microsoft Access 2010

Create a PivotTable or PivotChart report

Google Sites. How to create a site using Google Sites

Search help. More on Office.com: images templates

Basic Excel Handbook

Excel 2003 A Beginners Guide

Mail Merge (Microsoft Office 2010)

SECTION 5: Finalizing Your Workbook

HOW TO ORGANIZE PICTURES

Introduction to SharePoint For Team Site Owner/Administrators. Instructional Guide

Microsoft Excel Introduction to Microsoft Excel 2007

Chapter 9 Creating Reports in Excel

1. Go to your programs menu and click on Microsoft Excel.

0 Introduction to Data Analysis Using an Excel Spreadsheet

Microsoft Excel 2010 Lesson 13: Practice Exercise 3

Microsoft Excel 2010

Microsoft Access Rollup Procedure for Microsoft Office Click on Blank Database and name it something appropriate.

Step Sheet: Creating a Data Table and Charts

EXCEL EXERCISE #8: Consolidating and Linking Spreadsheets

Notes on Excel Forecasting Tools. Data Table, Scenario Manager, Goal Seek, & Solver

Introduction to Microsoft Excel 1 Part I

Spreadsheets and Laboratory Data Analysis: Excel 2003 Version (Excel 2007 is only slightly different)

Using Microsoft Project 2000

Excel 2007: Basics Learning Guide

Joomla Article Advanced Topics: Table Layouts

Using Microsoft Office to Manage Projects

This activity will guide you to create formulas and use some of the built-in math functions in EXCEL.

EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.

How to Concatenate Cells in Microsoft Access

Our goal, as journalists, is to look for some patterns and trends in this information.

Microsoft Excel 2010 Tutorial

Microsoft Access 2010 handout

In This Issue: Excel Sorting with Text and Numbers

Scientific Graphing in Excel 2010

Microsoft Excel Tips & Tricks

Highline Excel 2016 Class 26: Macro Recorder

Card sort analysis spreadsheet

Microsoft Word 2010 Training

Creating and Using Forms in SharePoint

Microsoft PowerPoint 2008

ECDL. European Computer Driving Licence. Spreadsheet Software BCS ITQ Level 2. Syllabus Version 5.0

Transcription:

Hints for formatting data in Excel spreadsheets By Kurt Schuler 20 January 2011; revised 21 March 2013 Contents: 1. Introduction 2. Using our calendar spreadsheet for daily data 3. Carrying over last recorded data into adjacent cells 4. Deleting dates with no data 5. Interpolating data 6. Developing your own spreadsheet and later adding cells for dates without data 7. Converting an array (matrix) of data into a column (vector) 8. Do you have other hints? 1. Introduction Versions of Microsoft Excel released since 2007 have much larger spreadsheets than their predecessors did. A single sheet in a file that has the extension.xlsx or.xlsb as part of its file name can now be as large as 1,048,576 rows by 16,384 columns, versus 65,536 rows by 256 columns previously. A single column in the newer versions is long enough to accommodate daily data for more than 2,800 years, and a single sheet is large enough to accommodate more than 17 billion data points. Here are some hints that will be useful if you have a long series of data and want to minimize time formatting it in Excel. 2. Using our calendar spreadsheet for daily data You have two choices for formatting dates initially: use an existing spreadsheet or develop your own. Historical Financial Statistics has a calendar spreadsheet file (http://www.centerforfinancialstability.org/hfs/calendars.xlsb) that has a sheet showing the day of the seven-day week and the date according to a number of calendars for the period 1500 to 2050. If you use our calendar spreadsheet for daily data, delete the columns corresponding to the calendars that you will not use at all. If you are using data from period when a country switched from one calendar to another, be careful to note the date of the change. A way to avoid confusing Julian and Gregorian dates when entering data is to keep them in separate columns but delete Gregorian dates before your original source starts using them and delete Julian dates after your original source stops using them. (Simultaneously press the keys Control-Shift-Up arrow or Control-Shift-Down arrow to go from where you have the cursor to the top or bottom of a continuous range of data. Then press the Delete key to delete everything in that range. If the data are not continuous, simultaneously pressing the keys Control-Shift-Up arrow or Down arrow will take you to the cell just before the first blank cell.) You can go back to our calendar spreadsheet later to insert the full range of Gregorian and Julian dates if you wish. The Historical Financial Statistics calendar spreadsheet file also has a sheet listing months for the period 1500 to 2015. The spreadsheet lists months according to various formats. For sorting monthly data, the most useful is usually the number format, in which January 1500 is 1500.01, for instance. 1

3. Carrying over last recorded data into adjacent cells You may wish to carry over data from a cell above, below, to the left, or to the right. For example, if you have the dates when a central bank changed its discount rate, you may wish to fill in all subsequent dates with the same rate until the next change occurred. Here is how: 1. Highlight the range of cells that includes both the cells already containing data and the blank cells you want to fill in. Highlight the whole range containing data cells and blank cells you want to fill; you do not need to repeat the procedure separately for each set of blank cells between cells with data. 2. In the Home tab of Excel, click on Find & Select, which should be on the right side of the screen. 3. Click on Go To Special. 4. Click on Blanks. 5. Click OK. 6. Excel will return you to the spreadsheet with the blank cells highlighted and the cursor beneath the first cell in the range that has data. To fill in blank cells below with data from the cells above them, hit the Equals sign, then the Up arrow, then Control- Enter. To fill blank cells with values in filled cells below, to the left, or to the right, use those arrows instead of the Up arrow. 7. In the range you highlighted, the blank cells should be filled with the values of the cells above (or below, left, or right, as applicable). 8. If you want to make the values permanent instead of leaving them as formulas, make sure you are in the Home tab of Excel; copy the range you desire; move the cursor to the place you want to copy the data to; click on Paste, which should be on the right side of the screen; click on Paste Special; then click on Paste Values. 4. Deleting dates with no data You may wish to start with a spreadsheet from Historical Financial Statistics and delete days or months in a data series where there are no data. Here is how. 1. Highlight the range of cells that includes both the cells containing data and the blank cells you want to delete. 2. In the Home tab of Excel, click on Find & Select, which should be on the right side of the screen. 3. Click on Go To Special. 4. Click on Blanks. 5. Click OK. 6. In the Home tab of Excel, in the Cells section, which should be towards the right side of the screen, click on Delete. 7. Click on Delete cells. 8. Click OK. 2

5. Interpolating data Excel has no function for interpolating data into blank cells. If you look on the Internet you can find bits of Visual Basic code you can plug in to do the job, or free downloads such as those available at www.xlxtrfun.com. 6. Developing your own spreadsheet and later adding cells for dates without data If it would be more convenient for you to enter dates yourself, you can later add dates that have no data. For instance, you may have data for trading days but you also want to show weekends and holidays in your spreadsheet. Here is how to add dates. (For a visual demonstration, see Mr. Excel podcast 1103, available on Youtube.) 1. Suppose your data are in column B and the accompanying dates are in column A. Go a few columns to the right, say in column F. Cut and paste from one of our spreadsheets or use Excel s automatic date-generating feature (described in the last paragraph in this section) to make a series that includes all dates from the start date to the end date of your series. 2. In the column just to the right of the column you made in step 1, match the dates in the column containing all the dates in the range to the column that only includes some of the dates in the range. Say that column A, cells 2-100, shows some of the dates and column F, cells 2-500, shows all of the dates. In column G, cell 2, write this: =MATCH(F2,A$2:A$100,0) Then use the cursor to grab the cell by its lower right corner, and drag the cursor down to cell G500, which is next to cell F500, showing the last of the full range of dates you want. 3. Convert the results in cells G2-G500 to values, which you can do by copying the cells to column H and pasting them using Home > Paste > Paste Values. Paste them over the original results in cells G2-G500. 4. Sort the cells in column G from smallest to largest. When Excel asks you whether you want to expand the selection or continue with the current selection, click expand the selection. The result will be that in column F you will first see all the cells that have matches to the corresponding dates in column A, followed by all the cells that do not. The cells in column F that do not have matches to column A will have cells next to them in column G that #N/A. These cells should start on the row right after the dates in column A. If they do not, you need to check the dates in column A to make sure you do not have a nonexistent date. Check also the top of columns F and G; sometimes Excel will insert a row or two of dates with #N/A up there. 5. Cut all the cells in column F that are next to cells in column G that read #N/A. Paste these cells into column A underneath the original dates. Doing so should give you the full range of dates you want in column A, with no repetitions. (In other words, dates should stretch from cells A2-A500.) 6. Sort the cells in column A from smallest to largest. When Excel asks you whether you want to expand the selection or continue with the current selection, click that you want to expand the selection. The result will be that column A will now contain all the dates in the range in correct order, and column B will contain blank cells corresponding to dates for which you have no data. 3

7. Delete columns F and G, which you no longer need. Save the sheet. If you write a date from 1 January 1900 onward in a cell, Excel will recognize it as a date and will automatically fill in subsequent dates if you highlight the cell, use the cursor to grab the cell by its lower right corner, and drag the cursor down or across. Be aware, though, that Excel erroneously lists 1900 as a leap year, containing a date of 29 February that did not really exist. Before 1 January 1900, Excel will not automatically fill in dates by dragging the cursor from a highlighted cell with a date in it. You must enter your own dates by hand or use an existing spreadsheet. If you are entering your own dates, the best format is probably year.month.date, all in numerals, using zeros as placeholders, so that 8 July 2010 becomes 2010.07.08. That format is the easiest for sorting data by date later. 7. Converting an array (matrix) of data into a column (vector) Suppose you want to convert the data of array A into column form, as in B or C. (You may want to check that the cells are values, including blanks or #N/A, rather than being formulas.) Array A Column B Column C 1 2 3 4 1 1 5 6 7 8 2 5 9 10 11 12 3 9 4 2 5 6 6 10 7 3 8 7 9 11 10 4 11 8 12 12 1. Go down a cell below the matrix, which we will call the anchor cell. Insert the formula below. The formula shows the anchor cell, which we will suppose to be cell G1, highlighted in yellow and the matrix, which we will suppose to be cells A1 to D3, highlighted in blue. Insert a different location for the anchor cell or for the size of the matrix as your needs require, but be sure to insert the dollar signs ($) so that the formula always refers to the same array of cells. To convert A into B (read A row by row) =OFFSET($A$1:$D$3,TRUNC((ROW()- ROW($G$1))/COLUMNS($A$1:$D$3)),MOD(ROW()- ROW($G$1),COLUMNS($A$1:$D$3)),1,1) To convert A into C (read A column by column) =OFFSET($A$1:$D$3,MOD(ROW()-ROW($G$1),ROWS($A$1:$D$3)),TRUNC((ROW()- ROW($G$1))/ROWS($A$1:$D$3)),1,1) 4

2. Use the cursor to grab the first cell in the column, which we have supposed to be G1, and drag it down until you have as many rows as there are cells in the matrix. 8. Do you have other hints? If there are other time-saving techniques you use often or that you think other researchers would use often, send a description to kschuler@the-cfs.org and I will review them, including them and crediting you in a future version of this note. 5