Excel Tips and Tricks

  • Published on
    12-Feb-2017

  • View
    21

  • Download
    1

Embed Size (px)

Transcript

  • c h a d @ t u t a m a i l . c o m P a g e | 1

    Excel Tips & Tricks I have only recently been awakened to the power and utility of Microsoft Excel.

    Previously, I thought Excel is only useful for people that work with lots of data e.g. data

    analysts, database administrators, financial analysts etc.

    This document is an overview of how I like to use Excel to gather, analyse, describe,

    calculate, store, transform, communicate and visualise. It is not meant to be a

    description of all the functionalities that Excel can deliver; there are plenty of people

    that can do more sophisticated things with Excel than I can, whether that is creating

    digital art, analysing very large and complex databases, designing art or managing the

    stock exchange of a developing country.

    The list is dynamic that will change as I (continue to) learn (more) from others, receive

    feedback from customers and colleagues, and learn from my mistakes. The contents

    cover:

    Formatting & Shortcuts

    o make Excel a more pleasant user/customer experience

    Formulas, Functions & Calculations

    o moving data

    o integrating data

    o analysing data

    o transforming data

    Navigation

    o moving across a workbook and within individual worksheets

    Cell Styles & Outputs

    o useful cell styles and formats to support improved user experience,

    navigation etc

  • c h a d @ t u t a m a i l . c o m P a g e | 2

    Table of Contents 1 Formatting & Shortcuts ........................................................................................ 4

    1.1 Create and use a template ............................................................................ 4

    1.2 Buffer top row + left column ........................................................................... 4

    1.3 Shapes .......................................................................................................... 4

    1.4 Default shape format ..................................................................................... 4

    1.5 Hyperlink shapes ........................................................................................... 5

    1.6 Format a cell .................................................................................................. 5

    1.7 Remove gridlines ........................................................................................... 5

    1.8 Cell Styles ..................................................................................................... 5

    1.9 Sparklines ...................................................................................................... 5

    1.10 Tables ........................................................................................................ 5

    1.11 Quick Access Toolbar ................................................................................ 6

    1.12 Name a selection of cells ........................................................................... 6

    1.13 Group / Ungroup data sets ......................................................................... 6

    1.14 Outline border ............................................................................................ 7

    1.15 Create a Chart (embedded) ....................................................................... 7

    1.16 Create a Chart (separate worksheet) ......................................................... 7

    1.17 Paste Special ............................................................................................. 7

    1.18 Limit worksheet view .................................................................................. 7

    2 Formulas, Functions & Calculations .................................................................... 8

    2.1 How many cells meet a criterion? .................................................................. 8

    2.2 How many cells meet multiple criteria? ......................................................... 8

    2.3 IF ................................................................................................................... 8

    2.4 IFERROR ...................................................................................................... 9

    2.5 INDEX MATCH .............................................................................................. 9

    2.6 What is the total, based on a criterion? ....................................................... 10

    2.7 What is the total, based on multiple criteria? ............................................... 10

    2.8 Generate an email distribution list ............................................................... 10

    2.9 Data forecasting, based on historical performance ..................................... 11

    2.10 How many business days between two dates? ........................................ 11

    2.11 Dynamically display todays date ............................................................. 11

    2.12 Run calculations ....................................................................................... 12

    2.13 Merge the contents of multiple cells ......................................................... 12

    2.14 Split the contents of a cell into multiple columns ...................................... 12

    3 Navigation ......................................................................................................... 13

  • c h a d @ t u t a m a i l . c o m P a g e | 3

    3.1 Move to the edge of a data set .................................................................... 13

    3.2 Move between worksheets in a workbook ................................................... 13

    3.3 Toggle cell display ....................................................................................... 13

    3.4 Extend data series ....................................................................................... 13

    3.5 Move to the last cell ..................................................................................... 13

    3.6 Highlight cells in a single direction ............................................................... 13

    3.7 Highlight cells to the beginning/end ............................................................. 13

    3.8 Select entire row/column ............................................................................. 13

    4 Cell Styles & Outputs......................................................................................... 14

    4.1 no zero ...................................................................................................... 14

    4.2 Bullet point ................................................................................................... 14

    4.3 Display the date ........................................................................................... 14

    4.4 Currency format ........................................................................................... 14

    4.5 Percentage format ....................................................................................... 14

    4.6 Date format .................................................................................................. 14

    4.7 Text to initial capitalisation ........................................................................... 14

    4.8 Remove capitalisation ................................................................................. 15

  • c h a d @ t u t a m a i l . c o m P a g e | 4

    1 Formatting & Shortcuts

    1.1 Create and use a template

    Set up your preferred workbook/worksheet formatting in a template (.xltx) so you dont

    have to redo formatting every time you create a new workbook. The template can

    include default settings for:

    Logos (and other objects)

    Title font

    Font and font size

    Cell styles/format

    Column and row sizing

    Tables

    Gridlines

    Shapes

    Worksheet name(s) and number of sheets

    1.2 Buffer top row + left column

    Create a small white space buffer before any text appears, by having an empty

    column A and row 1. The use of white space improves the readability of data being

    analysed and presented.

    1.3 Shapes

    Shapes can be used to create diagrams, describe processes and transform a

    workbook from a dull spreadsheet into a more interactive GUI-like experience.

    1.4 Default shape format

    Insert a shape and then modify the shape to the format you want e.g.

    Style

    Fill

    Outline

    Size and Properties

  • c h a d @ t u t a m a i l . c o m P a g e | 5

    Once you have completed this, right click on the shape and select Set as Default

    Shape. Ideally, store this default setting within a template (.xltx) file for repeated use in

    new workbooks.

    1.5 Hyperlink shapes

    [Ctrl] + [k]

    Attach a hyperlink (web page, cell within the same worksheet, another worksheet

    within the workbook etc) to a shape to enhance the GUI-like presentation and

    navigation.

    1.6 Format a cell

    [Ctrl] + [1]

    1.7 Remove gridlines

    Improve the readability of your data by removing gridlines.

    1.8 Cell Styles

    Set up cell styles to easily apply common/preferred/standard cell formatting throughout

    your workbooks and worksheets. See section 4 for suggested cell styles to create and

    use.

    1.9 Sparklines

    [Insert] Tab + [Sparklines]

    Rather than creating a chart, use sparklines to visually represent trends, to augment

    or to emphasise the story of a selection of data. There are multiple display options

    and colours, line weightings, normalisation of the data etc options. Example:

    1.10 Tables

    Use tables as an easier and more effective way to enter, analyse, reuse and reference

    relational data.

  • c h a d @ t u t a m a i l . c o m P a g e | 6

    1.11 Quick Access Toolbar

    Customise the Quick Access Toolbar with the functions, commands etc that you use

    most frequently. In conjunction with the use of keyboard shortcuts, everything you need

    should be within easy reach.

    1.12 Name a selection of cells

    Select a single cells or array of cells that have a common format (e.g. peoples names)

    and click on the Name Box to create an appropriate label. That label can now be used

    in formulas, lookups, references etc, rather than having to locate the specific cell(s).

    Refer to this function for a working example of its utility.

    1.13 Group / Ungroup data sets

    [Data] tab > [Group]

    [Data] tab > [Ungroup]

    Alternate between hiding or displaying underlying data and/or fields. This is my

    preferred way (rather than using the traditional [Hide]/[Unhide]) of improving the

    readability of, or navigation within a worksheet (i.e. decreasing the amount of data

    displayed on the screen), but also ensuring the amplifying/underlying data and

    information remains within easy reach.

  • c h a d @ t u t a m a i l . c o m P a g e | 7

    1.14 Outline border

    [Ctrl] + [Shift] + [&]

    Apply an outline border to a selection of cells.

    1.15 Create a Chart (embedded)

    [Alt] + [F1]

    Select the cell range and create a chart, displayed within the same worksheet.

    1.16 Create a Chart (separate worksheet)

    [F11]

    Select the cell range and create a chart, displayed in a new worksheet.

    1.17 Paste Special

    [Ctrl] + [Alt] + [v]

    1.18 Limit worksheet view

    If you are using a limited number of cells in a worksheet (which, for most of us, will

    almost always be the case) you should consider hiding excess rows and columns to

    limit the worksheet view. This is especially helpful if your data is contained in a single

    screen. Use this shortcut to quickly select the rows/columns to be hidden. Example:

  • c h a d @ t u t a m a i l . c o m P a g e | 8

    2 Formulas, Functions & Calculations

    2.1 How many cells meet a criterion?

    COUNTIF

    This function counts the number of cells that meet a specific condition or criterion e.g.

    a word or a value. Example:

    =COUNTIF(C2:C15,">95000"). This tallies the number of cells between C2 and C15

    that have a value greater than $95,000.

    2.2 How many cells meet multiple criteria?

    COUNTIFS

    This function counts the number of rows, across multiple arrays, that meet (all of) a set

    of conditions or criteria. All the conditions/criteria must be met for a tally to be made.

    Example:

    =COUNTIFS(C2:C15,">95000",D2:D15,"*Health*",E2:E15,"Fulltime*"). This counts

    the number of rows (from rows 2 to 15) that include a salary of $95,000, are from the

    Department of Health and Human Services, and are in full-time employment.

    2.3 IF

    Use this function to indicate whether a value satisfies a criteria/condition (or does not).

    IFS can be used to include multiple IF conditions, rather than nesting multiple IF

    statements. Example:

    =IF(D4>65000,"Above 65k","Below 65k"). The function looks at the value in D4 and:

  • c h a d @ t u t a m a i l . c o m P a g e | 9

    if it is greater than 65000, displays the result Above 65k, or

    if it is not greater than 65000, displays the result Below 65k

    2.4 IFERROR

    Use this function to insert custom text (or a blank) if an error is generated, following

    the execution of a calculation etc.

    Example:

    =IFERROR((F8/E8),"No overtime"). The initial calculation is to understand the ratio of

    overtime pay to total pay. Without IFERROR, if there is no overtime pay, the calculation

    will return an error (#VALUE!). In this case, IFERROR ensures the text No overtime

    is displayed, instead of the error marker.

    2.5 INDEX MATCH

    This function performs like a VLOOKUP, but offers more flexibility. Example:

    =INDEX('Raw data'!$C$2:$C$9101,(MATCH($B2,'Raw data'!$A$2:$A$9101,0))). The

    function does the following:

    'Raw data'!$C$2:$C$9101 is the location where the output field is looking at,

    which is salary data in the Raw data worksheet. The output text is based on the

    row that matches what is in B2 with the array 'Raw data'!$A$2:$A$9101, which

    is the original list of names.

  • c h a d @ t u t a m a i l . c o m P a g e | 10

    2.6 What is the total, based on a criterion?

    SUMIF

    This sums the value of a number of cells, based on a single criterion or condition.

    Example:

    =SUMIF(G2:G15,"*Health*",C2:C15). This sums the salaries between rows 2 and 15

    that relate to employees that work at the Department of Health and Human Services.

    2.7 What is the total, based on multiple criteria?

    This sums the total value of cells that meet (all of) a set of conditions or criteria. All the

    conditions/criteria must be met for a value to be included in the sum. Example:

    =SUMIFS(C2:C15,G2:G15,"*Health*",B2:B15,"F"). This sums the salaries between

    rows 2 and 15 that relate to employees that work at the Department of Health and

    Human Services and are Female.

    2.8 Generate an email distribution list

    TEXTJOIN

    Example:

    =TEXTJOIN(", ",TRUE,K2:K8). This takes the individual email addresses (to a

    maximum of 252 rows) and generates an email distribution list, which can be inserted

    into an email, without the need for any formatting.

  • c h a d @ t u t a m a i l . c o m P a g e | 11

    2.9 Data forecasting, based on historical performance

    [Data] Tab > [Forecast Sheet]

    Highlight a data set, including timeframes, and see what the forecast is, based on

    historical performance data. The analysis can be refined by accessing the Op...