Microsoft Office Tips for Word and Excel

Advanced Microsoft Excel – How to Use Sort and Filter

What are Sort and Filter?

Sorting and filtering are two entirely different concepts – almost opposite. But both allow you to look at your spreadsheet in different ways. Sorting allows you to see all your information a specific way. For example, the spreadsheet below is sorted by title:

Excel Spreadsheet with columns including Director Name, Date, Title, Edition, and Number of Discs

Films by Title Order

How to Sort

However, to sort by date, use Excel’s Sort and Filter Feature In-line image of Sort & Filter Button in Excel.

    1. Click on “Sort and Filter”.
    2. In the Sort and Filter Context Menu, click on “Custom Sort” – this will give you the most options.
    3. In the “Sort By” field, click on the down arrow to see the options for sorting.

Sort Tool with Column - Sort by circled in red and blue arrow pointing to the down arrow

    1. Once clicked, a list will appear of the column headings of the spreadsheet.

Sorting_menu_coices-showing

    1. Choose the item for sorting, for example, rather than sorting by title – sort by date.

Sorting menu in excel showing "date" as the sort value

  1. Click OK to confirm the choice.

Excel will now re-organize the spreadsheet to display by the chosen field.

Excel spreadsheet of films by date order

This is simply a reorganization of data. Everything that was there when the list was displayed in Title order is still there, but displayed by Date.

How to Perform a Multi-Level Sort

Excel also allows multi-level sorts, which can be quite powerful if you understand what is going on. In a multi-level sort, think of each additional level as “and then by”. To start, I’ve reorganized my spreadsheet by Director Name – just so it is in a neutral list to start.

Film spreadsheet sorted by director name

Now, let’s create a list by Date, then alphabetical by Title.

    1. First, click on “Sort and Filter”, then “Custom Sort”.
    2. Change “Director Name” to Date. For your own spreadsheet, pick any column to sort by.
    3. Now click “add a level”, to add the next level of sorting. Remember, Excel will sort first by the first thing chosen, and then by the next level.

Add Level button circled in Sort Tool

    1. Another Sort By line will pop-up, as before click the down arrow to choose the column to sort by.

Excel Sorting Tool showing two levels - Date, Then Title

  1. Click “OK”.

The result is a list sorted by Date first and then by Title.

Film list sample by date then title

It’s important to consider how you want to view data, especially with multi-level sorts. This sort lists the Date first, so you need several items with the same date, before the second level goes in to affect – the title. So, for example, if you had a product list and every product had a unique ID number, sorting by “Product ID” and then “Product Name” wouldn’t be terribly useful – since Product ID was unique – you’d simply have a list by Product ID. If you reversed that idea, and listed by Product Name then Product ID, the results would depend on the products you have – if there are several of the same product but by different companies, thus having different IDs, a list by Product Name and then by Product ID might be useful. (For example, if you had a high-end grocery and sold different types of cola and each had it’s own unique Product ID.)

Excel will allow up to three levels of sorting, but remember that you want both repeated information and unique information for the sort to be meaningful. An example of a good three-level sort might be if you had a list of all your music CDs. You could sort by (1) Genre or Type of Music and then by (2) Artist – the band or singer, and (3) then by album title. Since you are likely to have several types of genres in your music collection, many artists, but each album has a unique title, and in the cases where titles might be the same, the artist is probably different such a three-level sort should work.

How to Filter

Filtering is almost the opposite of sorting. Whereas with sorting you see all information presented in a different order – with filtering you are looking to “pull out” only certain types of information.

This sample excerpt spreadsheet of films in my DVD collection includes the genre of the film.

Sample film list genre included

To turn on filtering, click the sort and filter button on the ribbon, then click filter.

Sort and Filter - Filter circled on context menu

Once filter is turned on you will see little arrows next to each column.

Excel with filtering turned on

Click an arrow, such as the one next to “genre” in this example, and a “pick list” will appear showing all the categories in that column.

Excel filter by Genre, Everything Selected

By default, every unique value is listed. To apply a filter, uncheck all but the information you want to see.

Excel filtering with only "Musical" selected

Then click “OK”.

Filtered list of musicals

As you can see, rather than listing all films, the list is now limited to only musicals. You can tell the list is filtered because (a) the row counter on the far left now shows skips in the number sequence, indicating lines not shown, and (b) the filter symbol shows on the “Genre” column header.

In order to see the whole list again, go back to the filter symbol, click the arrow and choose “Select All”.

Select all - check marks appear next to each value

To turn off filtering entirely, go back to the sort and filter button, “filter” will be highlighted, click to turn it off.

Filtering is best used to view only a certain class of information.

Also, if you have a Yes/No column in your spreadsheet, you can filter to only show “yes” or only show “no”. You can even filter to only show blanks or to not show blank lines, by adding and removing check marks in the filter list.

Filtering: Yes, No, Blanks Sample

“Yes/No” filtering can be very powerful, and I use it at work all the time.

In this article, I’ve shown how to use sorting and filtering in Excel. Sorting and filtering are very useful and powerful tools for viewing the data in a spreadsheet. Mastering them will help you to get more out of your spreadsheet data.

Advertisements
Microsoft Office Tips for Word and Excel

Excel Basics – Formatting Sheets and Cells

Formatting Sheets

Professional spreadsheets should not look like an 8-bit game, or an Easter Egg. However, some formatting can make spreadsheets easier to read. This article will review formatting sheets and cells.

The spreadsheet itself should look professional. Excel files should be named – with short descriptive names. Your quarterly budget reports should be named “Budget First Quarter.xlsx” or “Budget January 2016.xlsx” Nothing says unprofessional like a report with a name that’s a sentence – or a file named “Book1”. Plus reasonably named files are easy to locate. And having a system – naming your monthly budget as “Budget Month Year.xlsx” makes it easy to find again. Use the “save as” feature to change the initial default name (usually “book1”, “book2”, etc.)

Not only should the spreadsheet file be reasonably named with an intelligent, relevant name, but each tab should also have a name or label.

To label tabs:

Right click the tab, then choose “rename”. Delete “sheet1” and replace with a short, descriptive name for the tab. You can also double-click on the tab and do the same thing – delete the default and rename it.

Rename Sheet Option in Excel

Deleting Sheets

Older versions of Excel, including 2010, automatically open a new workbook with three tabs. Please delete the tabs you are not using. Nothing says unprofessional like a spreadsheet with extra blank tabs named “sheet2” or “sheet3”. To delete an entire sheet: Right-click and choose “delete” – you may or may not get a pop-up asking if you really want to delete the sheet – if you do, choose “yes” and click “OK”. One of the few advantages of the newest version of Office (Office 2013 aka “Office 365”) is that when you open a new workbook you get one sheet. Which is often all you need.

Delete Sheet in Excel

What if you need additional sheets, though?

Inserting Sheets – Insert

There are two ways to add sheets.  The first is using the Insert Command.

Click the tab, click Insert on the pop-up menu, then click “Worksheet” and press the “OK” button.

Insert Sheet in Excel

Excel Insert Worksheet dialog Box

Move or Copy Sheets

Let’s say, though, you have a Yearly by Month budget in Excel, and every month you add a new “Monthly Budget” sheet. All your column labels and formulas are already entered into the “January” tab. Sure, the details will change from month-to-month, but the format is the same. With Excel, you don’t need to start over with re-creating all the formatting and formulas. Simply copy the sheet, keep the formatting and delete the data.

To copy a sheet, right-click the tab, and choose “Move or Copy”.

Move or Copy Sheet in Excel

Put a check mark in the “Make a Copy” box, (make sure in the drop list the new sheet will appear “at end” (the default is before the current sheet). If you forget this step, you can always go in and move the sheet.

Excel - Create a Copy Circled

“Move or Copy” is one of the most useful tools in Excel – you can even move sheets to a new book.

Creating a New Book Using Move or copy

Use the drop-down arrow to choose new book. Your new copy will have the default name of “book2” (or three or four, etc – depends on how many new spreadsheets you’ve created that day) be sure to save the spreadsheet with a new name.

And as it says on the tin, the move command allows you to re-arrange sheets in a multi-spreadsheet workbook.

Some versions of Excel also allow color-coding of tabs. This makes it easier to find the correct sheet in large multi-sheet workbooks. Right-click the tab and simply choose “tab color” from the menu.

Excel Tab Color

Formatting Cells

The formatting menu has several useful commands. To get to the formatting menu, right click and choose “format cells”.

Format Cells on Excel Context Menu

This button can be added to your “Custom Quick Access Toolbar” as can any of the tabs in the menu, such as formatting. There are many useful items in Format Cells, let’s go through them one at a time.

Number

Format Cells - Number

Excel was designed for crunching numbers – but it has many other uses – the Number tab allows the user to customize a row, or more likely a column, by setting how Excel views “numbers”. The most used option is to set a column to “text”. Click at the very top of the spreadsheet column (the letter), right click, choose “format cells”, choose “text” and confirm the choice by clicking “OK”.

This will force Excel to consider a column, even one with numbers, as text. Do you have a phone list for your office in Excel, but the spreadsheet tries to perform mathematical expressions with the phone numbers? Set the column to text. This command also works best if you set the column to text before entering data.

Alignment

Text Alignment Horizontal tells Excel how to align text inside cells. The default is “General” which means Excel will try to “guess” how to display data. Trust me – you usually don’t want Excel deciding for you.

For text – names, budget items, etc – you want Horizontal set to left, you can then adjust the column size to be the smallest possible. This, in turn, allows the spreadsheet to be of a reasonable size – especially if you need to print it.

Numbers, especially currency, are normally set flush right. Also set the Number type to “currency” or “Accounting” (both will line up numbers by the decimal point. Both allow one to turn the currency symbol on or off and choosing the number of decimal places. Currency allows formatting negative numbers as red and enclosed in parenthesis, which is an accounting standard.

Center, Justify, and Distributed aren’t terribly useful for columns of data – but they may be useful for column headers. I’ve also used “Center” for check mark columns or Yes/No columns.

Vertical alignment – leave it at “Bottom” – this will also make “wrap text” work correctly.

Text Control

Alignment, text control circled

Wrap Text allows you to wrap a long title or item in the same cell, so it appears as two lines but it’s in the same cell. This is extremely useful for any descriptive item. It also allows you to continue to use Excel’s sorting and filtering tools which are thrown off by blank lines or text that takes up multiple rows.

Shrink to fit I don’t use – but it probably does what it says on the tin – shrinks a particular item to fit in a cell.

Merge Cells is an interesting one. I use it in my first (title or cell label) row sometimes. Merge cells will take the cells you select and merge them into something that gives the appearance of a single cell. It’s useful for setting up the labels at the top of your spreadsheet.

Orientation allows you to tip the text to the angle you select in the box. Again, this is useful for setting up your first row that describes the content of a column. If you, for example, have long column headers but short information in the column – Orientation can be used to tip the words in the first row to make the spreadsheet overall shorter and the columns narrower. Think for example of an order sheet.

Example of an Order Sheet with Tipped Text

It is even possible to color-code the columns to make the order sheet easier to use.

Color-Coded Order Sheet with Borders

Another solution would be to wrap the text in the first row – however, each column will still need to be as wide as the longest word in the item description.

Font

Font formatting in Excel is the same as in Word and most other Microsoft Office programs. One thing to point out, the Calibri Font is a compressed san serif font that works beautifully in Excel. Excel often is used to organize a lot of information in an easy-to-understand format, often, ideally a single sheet, or a series of related sheets. Calibri allows the same information (same characters) to take up less space. It’s also San-Serif so it’s easy to read, especially on-line or for numbers.

Border

Borders is a way to format cells in a spreadsheet. This includes setting a line under, for example, all the cells in the first row which describe what information is in each cell. Borders can be used to highlight a cell – such as a final price.

Fill

Fill allows the filling of cells with color. This is also easier with the shortcut button Paint Can Icon for Fills. Both the shortcut and the fill tab allow for picking color from the standard colors by clicking the “More Colors” button.

Color Picker Excel

The Fill Effects button allows building of two-color gradients.

Gradient Fill in Excel

However, in professional spreadsheets it would be a very rare occasion that would require using gradients. Remember, most professional spreadsheets should look professional, not like an Easter egg. Shading the first row of a spreadsheet, the one with the column labels, is about all you need to do. The Cookie Spreadsheet I’ve used as some samples in this tutorial is designed to be fun – something to easily illustrate a few points, and certainly order sheets are a common use for Excel – but it’s a bit colorful for business purposes. Think about the purpose and use of your spreadsheets, and don’t over design with too much color or pattern.

Text Color

In Excel, text color can be changed using the Text Color button  Text Color Button, Line Under the Letter A . Click the arrow to choose the text color you want to use. Text Colors can be used to highlight data, such as negative numbers. However, text colors should be used sparingly.

Protection

Finally the Protection tab allows you to lock and hide spreadsheets. It also has no effect until you protect the worksheet. Basically ignore this tab.

Conclusion

Excel is a powerful spreadsheet program. It has many uses, and can be used to do many things that it’s designers probably never thought it would be used for (My Doctor Who Episode List for my Master Post was made using Excel). There are many different formatting options for Excel. Some you will use all the time – setting the Number format, Alignment, Borders, and Fills; others not-so-much such as gradient fills or protecting a worksheet. Just remember that the formatting you apply to spreadsheets should enhance comprehension, readability and visibility of information and not distract from it.

Microsoft Office Tips for Word and Excel

Excel Basics – Navigation and Freeze Panes

What is Microsoft Excel?

This is the first of three posts of knowledgeable information for working with Microsoft Excel. Excel is a spreadsheet program which is included with even the most basic versions of Microsoft Office. Excel is used for calculations, storing and working with financial data, and working with any sort of numbers in a home or office setting. Budgets, depreciation schedules, profit-and-loss statements, accounting statements, account balances, are all typical uses for Excel. I also use it for any information that looks best in a row and column format. I keep an up-to-date copy of the Doctor Who episode list in Excel, for example. Originally, I used the list to keep track of the DVD releases, but now that the entire Classic and New Series are available – I don’t need that primary purpose anymore, but it’s still good to have. Excel is also useful, for example, for lists of comics you have or need. Essentially, Excel is good for lists of highly changeable data.

One thing Excel isn’t is a true relational database. Although you can filter and sort information in Excel, that is not the same thing as being able to run queries a number of different ways, on tables that hold information separately. Microsoft Access is still a good, medium-sized relational database that is included in some versions of Microsoft Office, such as Professional 2010.

Excel Navigation

There are many common ways to move around in an Excel spreadsheet. First, you can simply click on any cell in the spreadsheet to select it. This includes blank cells.

You can use the tab key or arrow keys on your keyboard to move between cells.

To edit a cell, click, then move the mouse to the formula bar and edit in the formula bar.

Highlighted formula bar in Excel

Copy and paste is very easy in Excel, simply click the cell or cells you want to copy, press control and the letter C together (CTRL +C), click where you want to paste the information and press Enter. You do not need to use CTRL + V to paste (as in a word processing program or any other place). You can also drag and fill by clicking on the little box in the lower left corner of the cell, dragging it down several rows then releasing the mouse (this can be turned on or off in Options on the File tab).

Autofill is something you want to be careful of – and you may want to turn it on or off depending on an individual spreadsheet you are working on. Autofill will fill the contents of the cell based on what you have typed previously in the spreadsheet. This means, for example, if you have a sales spreadsheet for red, blue, and yellow balloons – and you are recording the sales, once you’ve typed a few rows of data, the second you type an “r” the cell will fill with “red”, and when you type a “b” the cell will fill with “blue” etc. Which seems all well and good, however, what if you are also recording the salespeople who sell the balloons (to calculate a bonus or commission, perhaps?) and your sales people are: Jane, Joan, Jon, Jim, John, Jill, Justin, Bob, and Mary. Every time you type a “J” Excel will try to autofill the result – without knowing the difference between Joan and Jon or Jim and Jill. Since Excel can autofill based on a single letter, your “J”-heavy sales department might see inaccurate results. It might be best to turn off autofill in this case, and manually type everything. Or use copy and paste. Or even use drag and fill. I find that I use “Autofill” only about half the time, and the rest of the time I have it turned off (again, in “Options” on the “File” tab) – it really doesn’t save that much time.

Quick Tip: Navigation

Having worked as both a temporary and full-time accounting assistant, and a temporary secretary or admin asst, I’ve spent a lot of time working with Excel. For the best and speediest results when editing and updating spreadsheets – use a variety of methods to move around a spreadsheet, especially a long or complicated one; click directly on a cell you need to change, edit in the formula bar, move from cell to cell with the tab key, move around the spreadsheet with the arrow keys.

Freeze Panes

Freeze Panes is a handy feature in Excel that allows you to set part of the spreadsheet (typically the top row or left-most column or columns to not move, even when the rest of the spreadsheet does move. By default, Freeze Panes is found on the View tab in Excel 2010 and later.

Freeze Panes on Excel View Tab

Because I find freezing the top row (or occasionally the first column) to be a very useful feature in Excel, I added the shortcut button to my Excel Quick Access Toolbar. The process to Add Any Command to the Quick Access Toolbar is the same for Excel or Word in Office 2010 or later.

How exactly do you Freeze Panes? And Why?

If you have a long spreadsheet, chances are you have a row at the very top that describes what is in each column (the pictures in this post have used a cleaned-up Access Export of my film list, the top row includes the Director Name, Title, Edition, etc.). But if you are editing or adding data, and the spreadsheet is very long, the top row will disappear quickly. How do you know what goes where?

Sure, it might seem obvious in a spreadsheet like the film list I’ve used as an example – but I’ve worked with extremely complicated, precise spreadsheets, where it’s vital to have information in the correct place. Spreadsheets such as Profit-and-Loss statements, Zero-balance accounting spreadsheets, even checklists with pass/fail tests consisting of five or six (or more) separate items one needs to record “yes” or “no” after looking-up information. It’s much easier to have the guide, in terms of the first row, visible. Freeze panes does that.

Simply place your cursor at the top of the spreadsheet in the first cell under the row to freeze, click the “freeze panes” button, then click “freeze top row”. If you have a spreadsheet set up where the first column doesn’t change and new information in recorded in columns and rows to the right of the first column, choose, “freeze first column”. You can tweak the two presets by using “freeze panes” – just make sure you place your cursor in the correct place. This is helpful if you need to freeze the first column and the top row, or if you have two or more “top rows” that you want to freeze.

 

Freeze Panes in Excel

Freeze Panes is an essential tool for working with Microsoft Excel.

This blog post introduced basic navigation in Microsoft Excel and how to freeze panes to make navigation of long spreadsheets easier. Future blog posts with tips and tricks for using Microsoft Excel will include how to format cells, and how to use sorting and filtering tools.

What would you like to learn about using Microsoft Excel? Feel free to leave me questions in the comments.

Microsoft Office Tips for Word and Excel

How to Create and Use a Microsoft Word Macro

What is a Macro?

A Macro is a method of automating a series of actions. Macros can be used in both Microsoft Word and Microsoft Excel, but this tutorial will concentrate on Microsoft Word. Macros are like a very small program, however, they are even smaller than the most basic program or application.

Aren’t Macros “Viruses”?

A Macro is not a virus. It’s a program, in a sense (actually it’s smaller than a program). Macros for Microsoft Word and Excel are written in the Visual Basic scripting language (VB). Theoretically, if some unscrupulous person were to e-mail you a macro and you installed it – you could install a virus. However, Javascript, Java, Flash, Shockwave (older Flash), Frame .Net, and several other scripting languages that make the Internet work could also “hide” viruses. Just as you should avoid suspicious websites, always run anti-virus software, and run anti-spyware, and anti-adware programs on your computer – you shouldn’t install a suspicious “free” macro. But if you write the macros yourself in VB, or use the Macro Recorder in Word or Excel to create your own Macros – there shouldn’t be any problem and you shouldn’t encounter a virus. After all, Why would you put a virus in code you wrote yourself?

When to Use a Macro

It is important to give some thought as to what situations may be improved or made faster or more consistent by using Macros. Macros automate steps – to be worth it, it should be a fairly long, repetitive, series of steps. If you find yourself doing the same thing over and over, with no variation, a Macro might help you. The other key to using macros is that it must be the exact same series of steps – you cannot (easily) include a variable in a macro. So if you’re writing a phone list in Word but everyone’s name and phone number are different – that is not a good candidate for a Macro. Also, there should be several steps – if it’s just one or two, a Macro probably isn’t worth setting up.

There are other ways to automate formatting of text such as with Styles. And Find and Replace is a marvelous tool that can help and automate changing certain types of text formatting (such as removing double spaces after a period and replacing them with a single space.) You can also use a Macro to automate steps in a Find and Replace sequence.

When developing Macros, stick with repetitive tasks with several identical steps – but once set-up they can save you time.

How to Create a Macro

Creating a Macro is really very easy, although they are written in Visual Basic (VB), you don’t even need to know VB to create Macros. One of the easiest ways to create a Macro is by using Microsoft’s Macro Recorder.

  • In Microsoft Word 2010 and later, click the developer tab. If you don’t see the developer tab, do the following:
  •  Go to the File tab, then
  • Click Options, then
  • Click “Customize Ribbon”
  • Put a check mark in “Developer” and click “OK”
  • The Developer Tab should now be visible

Developer_tab

  • Next, click the Macro Recorder button – be sure you know what steps to perform for your macro because once you hit the record button every action will go into your Macro.

Record_Macro_Button_Dev-tab

For this lesson we will create a Macro to replace hard-coded line breaks with paragraphs marks. Why? Have you ever copied a professional article, or even a fanfic from on-line to Word for off-line reading – only to have it be only three and a half or four inches wide no matter what you do? The article or story has hard-coded line breaks at the end of every single line. To make the text flow, the first step is to get rid of the hard breaks. After the line breaks are removed, extra paragraph marks can be removed separately (and manually).

By hand (without a Macro) you remove a hard break by using Find and Replace.

  • Click Find (the binoculars)
  • Choose Replace… from the pull-down menu
  • Click More>>
  • Click Special and open it with the pull down menu

Find_and_Replace_Special-button

  • Click in “Find What” then click “Manual line break” in the Special Menu

Pop-up_Menu_Special-Characters_Find-Replace

  • Click in “Replace with” then click “paragraph mark”
  • Finally, click “Replace All”.
  • Once it’s run, it will tell you how many replacements it’s made. You can close out of Find and Replace.

To create a Macro using Recorder, press the Record button, do all the steps above, close out of Find and Replace, then click “End Record”. (If you want to know how many replacements were many each time you use the Macro stop recording with clicking “Replace All”. However, you’ll need to close “find and Replace” every time you run the Macro.)

The Macro dialogue will also ask you to name your Macro and if you want to assign it to a button or keyboard combination. I usually go with “button” and have the Macro on my Quick Access toolbar. When I’ve worked in Technical Writing and had ten or so Macros for different functions, our version of Word had a new Ribbon Group with all the Macros we used for work on it. But for a home user or small business, placing buttons on the Quick Access Toolbar is fine. And of course, if you would rather use a Keyboard Combo, that is fine too.