sddefault (1)

How to Print Graph / Grid Paper in Excel

An Excel spreadsheet has lines and displays like a grid. And rather than buying graph or grid paper, you can print it out yourself and customize it. Below, I’ll show you how.

How to create your own graph and grid paper in Excel

1. Select all the cells in your spreadsheet. You can do this by using the CTRL+A shortcut.

2. Adjust your column width. Right-click any column header and re-size the column width to 2. You can make this smaller or larger if you prefer.

Adjusting the column width in Excel.

3. Select the PDF printer. Go to File -> Print and select Microsoft Print to PDF.

4. Modify the margins. Instead of Normal Margins, select Custom Margins. Set the margins all to 0 to maximize the space on your sheet. Also, on the margins page, select the options to center your page both horizontally and vertically.

Modifying the margins in Excel.

5. Select the cells on the main tab. Go to the View tab and select Page Layout to see what an entire page will look like. Select all the cells for that initial page.

6. Adjust your borders. On the Home tab, select the drop-down option for borders and select More Borders.

Modifying borders in an Excel spreadsheet.

Here you can adjust the color and look of your gridlines. Although Excel looks like it has gridlines on the cells, they won’t actually print out until you do this step and actually format them. I prefer to use a moderate grey color so that the outline isn’t too dark or too light.

Applying border formatting to cells in Excel.

6. Save the file as a PDF. By saving the gridlines how you want, you now have a graph paper template which you can re-use to print out whenever you need to. If you want 1 page or 100, you can just create as many copies as you need.

The benefit of setting up your own grid paper is that you can customize it so that it looks just how you want. For example, you could decide to highlight certain cells a specific color and apply different types of formatting to suit your needs.


If you like this post on How to Print Graph / Grid Paper in Excel, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

sddefault (1)

How to Create a Secondary Axis in Google Sheets

If you want to create a chart in Google Sheets that displays different kinds of data, you may benefit from using a secondary axis. If you just use a single axis, that may not be ideal as depending on the scale, your data may not display correctly if the values are either too large or too small for a series.

In the chart below, I have data which shows actual sales numbers along with year-over-year growth rates. They are plotted with just a single axis being used. As you can see, it becomes difficult to see the growth rate because the values are so low.

Chart showing Netflix's sales data and growth rate.

The right line for the growth rate is barely visible at the bottom. Since the growth rate is in percentages, the values will be fairly small (less than one), hence they are only slightly visible. To fix this, I need to adjust the axis the growth rate shows on. Here’s how to put that series on a separate axis:

  • Select the chart, click on the three dots in the right-hand side, and select Edit
  • Click on the Customize tab and go under Series
  • Select the series you want to put onto another axis. In my example, it is the growth rate.
  • At the bottom, change the Axis selection from Left axis to Right axis
Changing a series axis in Google Sheets.

That’s it, now the growth rate shows more clearly and I can see the related axis on the right-hand side of the chart.

Chart showing Netflix's sales data and growth rate with a second axis.

You may also want to display the series differently, such as showing by dashes rather than a straight line, but that is an optional step. To make changes to an individual series, simply select the series as you did when changing the axis, and make changes in that same screen. In the chart below, I’ve simply changed the line so that is shows as a dash:

Chart showing Netflix's sales data and growth rate with a second axis and a dashed line.

For another example of how to add a secondary axis, check out the below video:


If you like this post on How to Create a Secondary Axis in Google Sheets, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

sddefault (1)

How to Use Compare Mode in Google Sheets

If you’re creating a chart on Google Sheets, there’s a really useful feature you can use which makes it easy to compare values, and that’s compare mode. In this post, I’ll go over how to use compare mode and how it can help you easily compare results in your charts. Here’s a sample data set I’ll use for this example, which shows excerpts from Nvidia’s annual earnings numbers:

Key earnings data from Nvidia.

These figures are all in billions and I’m going to plot them on a simple chart in Google Sheets to help display these values. This what a simple line chart showing these values looks like in Google Sheets:

Line chart in Google Sheets showing Nvidia's financial numbers from the past few years.

While the chart is easy to see, it can be challenging to see what those numbers are without the use of a data table. And using labels would be too cluttered. The best solution here is to use compare mode.

How to turn compare mode on in Google Sheets

To activate compare mode, select the chart in Google Sheets. Then, select Edit Chart and under Customize, select the option for Chart Style and then check off Compare Mode:

Enabling compare mode in Google Sheets.

Now, with compare mode enabled, you can easily see the values for each year. First, click away from the chart and then click back on it, to activate it again. Then, you when you hover over a data point, you will see all that data points which relate to that year:

A Google Sheets chart with compare mode activated.

This saves me the trouble of having to try and estimate what the values are and avoids having to use a data table or labels. And as I hover over different data points, I’ll get the updated values for each year.


If you like this post on How to Use Compare Mode in Google Sheets, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

sddefault

Quickly Add Rows and Columns in Google Sheets

Google Sheets is a powerful and versatile tool for managing data, whether you’re tracking expenses, analyzing survey results, or organizing information for a project. One of the fundamental skills you need to master is adding rows and columns to your spreadsheet. This guide will walk you through how you can quickly add either rows or columns to provide you with enough room for your data set.

How to Add Several Rows or Columns at Once in Google Sheets

You can add an extra row or column in Google Sheets by just right-clicking on any cell in your spreadsheet and selecting to either Insert 1 Row Above or Insert 1 Column Left:

Menu in Google Sheets to add rows and columns.

Since you’re adding an entire row or column, it doesn’t really matter which cell you select in your spreadsheet. But you might need to add more than just a single column or row. What if you wanted to add 20 columns, or 20 rows? In that case, simply select that many rows or columns and right-click to select whether you want to add columns or rows. In the below example, I’ve selected 20 rows and columns, and now I have the option to add that many as well:

Menu in Google Sheets to add 20 rows and columns.

If you want to add a lot of rows, there is an easier way to do this than selecting how many rows you want to add.

How to Input the Number of Rows You Want to Add

You can specify how many rows you want to add by just going to the bottom of your Google Sheets spreadsheet. By using the shortcut CTRL+DOWN two times, that will get you to the bottom of your sheet and you’ll see an option to enter in the number of rows you want to add:

Input to add more rows in Google Sheets.

Although the default is set to 1,000 you can add more or less than that. But if you specify a large number, it may take some time for those rows to get added.

How to Add Many Columns in Google Sheets

Unfortunately, going to the right-most column of the screen, you don’t get a similar option to specify how many columns to add. This is likely because adding a lot of rows is going to be more common for users than just adding columns; spreadsheets are more often going to be expanding vertically rather than horizontally.

The quickest way to add a lot of columns is to select all your cells using the CTRL+A shortcut and then adding as many columns as you have on your spreadsheet. This will effectively double the number of columns you have. You can repeat these steps to continue doubling until you have enough columns.

Important Note About Large Google Sheets Files

Before you try and create a Google Sheets spreadsheet with 100,000 rows, be careful because you may notice performance issues when your file gets too large. If you have an extremely large data set, you may still be better off using Excel for that purpose as opposed to Google Sheets. Handling large amounts of data isn’t ideal in a Google Sheets spreadsheet as it can take a while to make changes, and that can slow down your machine and the page may even crash.

While Google Sheets can be a great way to share information and data between users, I wouldn’t suggest trying to use it as a replacement for Excel, especially if you work with significantly large data sets (e.g. tens of thousands of rows long). It may work depending on the complexity of your file but you may want to test out the performance before relying on Google Sheets entirely.


If you like this post on How to Quickly Add Rows and Columns in Google Sheets, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

sddefault

Create an Automatically Updating Pivot Table in Google Sheets

Did you know you can create a pivot table in Google Sheets which automatically updates as you add data to it? Remarkably, it’s an easier process than in Excel where you would need a macro or where you might need to right-click on the pivot table and select to refresh the data. Here’s how we can go about creating a pivot table in Google Sheets, and having it automatically update.

Creating a pivot table in Google Sheets

For this example, I’m going to use the following data for my pivot table:

A table in Google Sheets.

To create a pivot table with this range, all I need to do is, with a cell selected, to go to the Insert menu and click on Pivot Table

Inserting a pivot table in Google Sheets.

As long as you have a cell selected on your data set, Google Sheets will automatically detect your range. If it looks correct, you can just select whether you want it to be placed in a new sheet or an existing sheet, and then click on Create.

Selecting where to create a pivot table.

The next part is to setup the pivot table and ensure that the value section contains values and you have something in either the rows, columns, or filters sections to summarize your data. In my example, I’m going to summarize my data by rep and store:

A pivot table in Google Sheets.

The pivot table is setup but the problem is it won’t automatically update. Here’s how we can fix that.

Setting up your pivot table so that it automatically updates in Google Sheets

The problem with this pivot table lies with the range. While Google Sheets correctly detected a range, it also set it to a specific number of rows. My data set went up to row 201 as it contained 200 rows of data. But if I add more data, my pivot table won’t automatically expand. To get around this, I need to adjust my pivot table range.

With my pivot table selected, I can see the range that it references in the Pivot table editor pane:

The pivot table editor pane in Google Sheets.

If I add another row of data, I can adjust this range so that it goes from A1:G202. But this would be a very tedious task if every time I added data I needed to remember to adjust the range. Instead, what I can do is adjust my range so that it references entire columns. By doing this, Google Sheets will automatically detect the size of my data set. In this example, I just need to set my range to A:G:

Changing the range in the pivot table editor.

Now my pivot table will include a blank value under the Salesperson field as well as a blank store value.

A pivot table in Google Sheets which includes entire columns.

To fix this, what I can do is hide row 3 and column B, since these ranges contain the blanks. And as long as the blank values always appear first, this can be an effective way to hide the data, even if the pivot table expands.

A pivot table with the empty rows and columns hidden.

If you like this post on How to Create an Automatically Updating Pivot Table in Google Sheets, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

sddefault (1)

How to Add IF Statements to a Pivot Table

Pivot tables are a powerful feature in Excel that allow users to summarize, analyze, and visualize data. One of the more advanced features of pivot tables is the ability to add calculated fields. Calculated fields enable you to perform calculations on the data within your pivot table without modifying the original dataset. This can be incredibly useful for generating new insights and custom metrics. In this post, I’ll show you how you can take them a step forward and even incorporate IF statements within calculated fields. Here’s the data set that I’m going to use for this example:

A table of values showing dates, categories, and gains and losses.

How to add calculated fields in a pivot table

To add a calculated field to a pivot table, take the following steps:

1. Convert your data into a Pivot Table.

2. Click on any cell within your Pivot Table to activate the PivotTable Analyze tab on the ribbon.

3. On the PivotTable Analyze tab click on Fields, Items & sets and then select Calculated Field

4. Enter a name for your calculated field in the Name box.

5. Write out the formula you want to use in the Formula box. You can use existing fields (columns) from your dataset by double-clicking on the field names listed in the Fields box.

6. After you’ve completed writing your formula, click Add then press OK. Your calculated field will be added to the PivotTable, typically in the Values area.

How to use an IF statement in your calculated field

One of the more powerful uses of calculated fields is the ability to include conditional logic using an IF statement. This allows you to create dynamic calculations that can change based on the criteria you set. For my pivot table, I just have a list of dates to start with:

Pivot table showing a list of dates.

Suppose I want to create a calculated field which will show a value if it is profit (i.e. a gain), and a loss field which will show a value when it is negative.

In the formula box, I’ll write an IF statement for my profit field calculation. It will reference the gain/loss field which I already have. If the value is positive, it will retrieve that value, otherwise it will be zero.

Calculated field calculating a profit.

Now, I’ll click on Add and then I’ll setup the Loss field:

Calculated field calculating a loss.

Now when I add these fields to my pivot table, I have one column for the profit values, and one for the losses:

Pivot table showing profits and losses in separate columns.

If you like this post on How to Track Income and Expense in a Single Chart, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

Income and Expenses Chart

How to Track Income and Expense in a Single Chart

Do you want to create a budget which tracks income and expenses on just one chart? There’s an easy way you can combine them where you can show positive and negative values in a single column. Suppose we have the following income and expenses over a 14-day period:

Table of income and expenses.

You might be tempted to plot these values on a simple column chart like this:

Column chart showing income and expenses.

This, however, means you’re using up two columns for each day. One for income, and one for expenses. While it is effective, what you can also do is combine the income and expense amounts into a single column. The key is to change the chart type and instead of using the default Clustered Column Chart, you select the option for a Stacked Chart. By doing this, you’ll now have both values on a single column:

Stacked column chart showing income and expenses.

This is still not optimal, however, as now we are just adding the income and expense together. Even though they are color coordinated, there is a better way to display this. Ideally, we will show expenses being a negative outflow on a given day while income will be positive. To fix this, let’s flip the expenses so that they are negative. But rather than doing this manually, you can do this with just a few steps.

To flip values from positives to negatives in Excel, do the following:

1. Enter a value of -1 into a cell.

2. Copy that cell.

3. Select the range which contains the values you want to flip from positive to negative.

4. With those cells selected, right-click and select Paste Special and select Multiply

Paste special options.

Doing this will flip your values negative by multiplying all the values by a factor of -1. You can also follow these steps if you want to flip negative values into positives.

After updating the formatting, my table now looks like this:

Table of income and expenses with expenses showing negative values.

And now my chart has also updated to show negatives beneath the income.

Stacked column chart showing income and expenses with expenses showing below income.

This ensures I’m not taking up extra space with an extra column and it still makes it easy to compare the outflows versus the inflows.


If you like this post on How to Track Income and Expense in a Single Chart, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

sddefault

How to Break Ties in Excel and Rank with Multiple Criteria

If you’re tracking standings in Excel, you know it can be challenging to ensure that you have your rankings setup correctly, especially when factoring in multiple criteria. Ranking values based on a single column or field isn’t complex, but when you start to factor in multiple conditions, it can get a little bit more complicated. Here’s a scenario I’ll attempt to solve where multiple teams have the same number of points, but where their goal difference isn’t the same:

Table showing team standings.

By using an additional criteria as a tiebreaker, you can ensure you rank the teams properly. But how do you setup the formula, and what if you also want to factor in more columns and use a method which can be used for more complex situations? That’s what I’ll go over in this post.

Using the Rank function

If you were to rank these teams based on points, you would use the RANK function. You would use the value in the points field and rank it based on those values. If my first value is in F2 and the range for the points field is F2:F5, my formula would be as follows:

=RANK(F2,$F$2:$F$5)

The limitation of this method is that it will result in repeating values since multiple teams have 4 points:

Table showing team standings with a field for a simple rank.

How to use multiple criteria in your ranking calculations

The RANK function only allows us to base the calculation on a single field. But there is a way we can still rank the values based on multiple fields. This involves using multiple functions, and fractions. Assuming the key criteria is points, then the current formula can be kept as is. But let’s assume the second criteria is goal differential. Then, we can rank the teams based on this field, but divide the value by a factor of 10. Here’s what the formula would look like assuming goal difference is in column G:

=RANK(G2,$G$2:$G$5)/10

This then gets added to the original formula:

=RANK(F2,$F$2:$F$5)+RANK(G2,$G$2:$G$5)/10

Based on this calculation, now my formula shows an additional decimal point and I can now rank the fields based on a second field:

Table showing team standings with a field for a rank based on multiple criteria.

And now I can re-sort the data based on the rank, which correctly tells me that Team 4 is in second place when ranking them based on points, and then goal difference.

A sorted table showing team standings with a field for a rank based on multiple criteria.

You can extend this logic to more criteria and fields. Let’s assume a more complicated scenario where the goal difference for the tied teams is 0. And instead, it comes down to a third criteria, which is their fair play score:

Table showing team standings with additional criteria for fair play scores.

Assuming Fair Play is in column H, here is my updated ranking calculation:

=RANK(F2,$F$2:$F$5)+RANK(G2,$G$2:$G$5)/10+RANK(H2,$H$2:$H$5)/100

In this situation, Team 2 will have the second-best ranking because it has the best fair play score.

A sorted table showing team standings with a field for a rank based on three criteria.

My ranking calculation now has yet another decimal place and another criteria which it can factor into its calculation. You can also adjust the criteria if, suppose, the lowest score for Fair Play is the best. Let’s say the lower the Fair Play score, the better the team should rank. In that case, we can adjust the formula so that we specify the rank should be in ascending order for that last criteria (the default is descending order):

=RANK(F2,$F$2:$F$5)+RANK(G2,$G$2:$G$5)/10+RANK(H2,$H$2:$H$5,1)/100

I just needed to add the final argument to the last criteria, setting it to 1. And now when I re-sort the rank, Team 4 gets the second spot:

A sorted table showing team standings with a field for a rank based on three criteria and when factoring in ascending order.

By setting up your ranking calculation this way, you can have the flexibility of adding more fields and criteria into your ranking. If you want to add another field, simply add it to your formula and divide that value by 1000, and so forth.


If you like this post on How to Break Ties in Excel and Rank with Multiple Criteria, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

sddefault

How to Add a Calculated Column in Power Query

Power Query can help you summarize and analyze your data. But did you know that you can also add calculated columns similar to how you might in a pivot table? In this post, I’m going to show you how you can compare your values against an average to show a percent change in a new calculated column within Power Query.

This is the table that I am going to work with for the purpose of this calculation:

Power Query table showing sales data.

Calculating an average from a column in Power Query

Before I create my calculated column, I’m going to create an average that I can compare against in the Price field. Here’s how I can calculate an average:

1. Create a new step in Power Query. This can be done by clicking on the fx button next to the formula bar. This will create a new step which will reference your most recent step automatically. Since my first step was just the Source that is what my new step will refer to:

Creating a new step in power query.

2. Use a List function to perform a calculation on a column. In Power Query, there are many List functions you can use to do calculations. In this example, I want to calculate the average based on the Price field. So my formula will be as follows:

= List.Average(Source[Price])

I have wrapped the Price field within the step that I was referencing (Source) and used that as the argument in my List.Average function. There are other List functions you can use to calculate things like max, min, standard deviations, and other common calculations. This formula now computes the average for that field:

Power Query performing an average calculation based on a column.

3. Rename your new step. This is an optional step but it is a useful one if you want to reference this value later on. Rather than referencing a ‘Custom’ step, I can right-click on the step and choose to Rename it. Since I’m calculating an average, I’m going to rename it to Average.

Creating a calculated field which compares the percent difference from the average

I’m going to create a calculated column that takes the current price and compares it to the average value that I calculated earlier. Then, I’m going to convert that into a percentage difference. Here are the steps to create a calculated column in Power Query:

1. Add a custom column. Click on the Add Column tab in Power Query and select Custom Column.

2. Enter the formula for the column. You will now be prompted to create your formula and name your new column name. I’ll call this % Difference. And my calculation will take the current value in the Price and divide it by the Average and subtract 1, to get the percentage difference. Here’s what the formula looks like:

Creating a calculated column in power query which determines the percent change.

One key thing to note here is that I reference the Average as that is the name of the custom step I created in the previous section. It is saved in my steps and so Power Query is referencing that step in this calculation. If you are referencing a previous step, you will want to ensure it is above your calculated step to avoid running into a circular reference.

A custom column calculation is listed below the average calculation.

After clicking on OK, Power Query now creates that additional step for me:

Power Query creating a calculated column showing the percentage difference.

3. Change the format (if necessary). My column has been created but since it is a percentage, I want to change the data type so that it correctly shows a % rather than a decimal number. To do this, I can right-click on the data type (where it shows ABC and 123 underneath), and change that to a percentage. Now my new column correctly displays as a percentage:

A calculated column showing the percentage change in a percentage format.

For another example of how to run these calculations, refer to the following video:


If you like this post on How to Add a Calculated Column in Power Query, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

hideblanks

Hide Blanks and Error Values on a Pivot Table

Do you want a quick way to clean up your pivot table and remove blanks and errors from it? Below, I’ll show you how to do that with just a few steps. In the below pivot table, I have error values and blank row values, which indicate that data is missing:

Pivot table with blank and error values.

Ideally, we would adjust our data set to ensure that this data is cleaned and there are no errors. But if you need to quickly clean this up, here’s what you can do.

How to remove error values from a pivot table

To prevent error values from showing on your pivot table, follow these steps:

1. Select your pivot table.

2. On the PivotTable Analyze tab, click on Options

3. Under the Format section, check off For error values show

4. If you want something else to show in place of an error value, enter it in that field. Otherwise, leave it blank and then press OK.

Replacing error values in the pivot table options.

Now your pivot table will not show any error values on it:

Pivot table without any errors showing.

There’s still the issue of the (blank) value in the row labels. Let’s address that issue next.

How to remove (blank) row labels from a pivot table

Follow these steps to get rid of the ‘(blank)’ row values which appear in your pivot table:

1. Select the drop-down filter button on your pivot table.

2. Select Label Filters and Does Not Equal

Applying label filters in a pivot table.

3. Set the criteria so that it does not equal (blank)

This will now remove the blanks from your pivot table:

A pivot table without blanksand errors

Now both the blanks and error values are gone from your pivot table.


If you like this post on How to Hide Blanks and Error Values on a Pivot Table, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.