Conditional formatting menu option

Google Sheets | Highlight Duplicate Data in a Column or Row

When you’re working with data in a spreadsheet, there are often duplicate values that need to be considered. This tutorial will show you how to highlight the repeated items in a few easy steps.

First, highlight the column or row that you want to evaluate.

Click Format in the top menu then Conditional formatting…

Conditional formatting menu option
Menu option for conditional formatting

The Conditional Formatting menu option will pop up a Conditional format rules menu on the right side of the screen (on the desktop version of Sheets).

If you want to learn more about the complex subject of conditional formatting, I have created a course about it over at Datacamp. This is an affiliate link and if you use it to make a purchase I will receive a portion of the proceeds. Thank you for supporting my channel!

Rules for conditional formatting

Rules for conditional formatting

Click the plus sign to begin adding the rule. In the drop-down menu for Format cells if choose the last option which is Custom formula is.

Custom formula menu option

Last menu option is custom formula

In the box that appears below Custom formula is enter =COUNTIF(A:A,A1)>1. Note that you have to start the formula with a = sign just like any other spreadsheet formula. If you were highlighting a row instead of a column, specify the row as 1:1 if the row were the 1st row. If you are not familiar with COUNTIF, learn how to use it here.

This will start at A1 and check to see if the value in A1 occurs more than once in the selected range. Then, the conditional formatting goes to the next cell, A2, and so on, until it gets to the end of your specified range. Now, all of the duplicates in your list are highlighted.

The A:A may seem a little strange but this is a method of specifying an entire column no matter how many rows are used.

Result

Result with highlights duplicated

Video explanation

 Live examples in Sheets

Go to this spreadsheet for examples
of highlighting duplicates that you can study and use anywhere you would like.

 

Two Columns of Data with One Highlighted

Google Sheets | Conditional Formatting Based on Another Cell

Using Google Sheets for conditional formatting based on a range’s own values is simple. Formatting based on another range of cells’ values is a bit more involved. Following are step-by-step instructions to format a range of cells using values in another range of cells.

What is conditional formatting

Conditional formatting is used to highlight to the reader of the spreadsheet certain values that meet certain criteria. It can be used to show items over/under a certain amount, later/earlier than a certain date, or only the widgets sold by Joan.

Video explanation

If you want to learn more about the complex subject of conditional formatting, I have created a course about it over at Datacamp. This is an affiliate link and if you use it to make a purchase I will receive a portion of the proceeds. Thank you for supporting my channel!

Conditional formatting based on another cell

Our objective in this example is to highlight all of the dates on which Joan had a sale.

Select the range that you want to have highlighted. Even though you are going to be referencing another range of cells, you still only need to select the range that you are going to be formatting. In this example, we’ll be highlighting the date column.

Two Columns of Data with One Highlighted
Two columns, one highlighted

Click Format in the top menu then Conditional formatting…

Conditional formatting menu option
Menu option for conditional formatting

The Conditional Formatting menu option will pop up a Conditional format rules menu on the right side of the screen (on the desktop version of Sheets).

Rules for conditional formatting
Rules for conditional formatting

Click the plus sign to begin adding the rule. In the drop-down menu for Format cells if choose the last option which is Custom formula is.

Custom formula menu option
Last menu option is custom formula

In the box that appears below Custom formula is enter =B1="Joan". Note that you have to start the formula with a = sign just like any other spreadsheet formula. Also, note that you need to surround the word Joan with “s since it is a word instead of a number.

Custom formula
Custom formula

Now you have the sales data with dates highlighted on which Joan made sales.

After conditional formatting
After conditional formatting

Extending to the entire row

If you want to highlight the entire row based on the value of one cell, continue reading here.

 Live examples in Sheets

Go to this spreadsheet for examples of conditional formatting that you can study and use anywhere you would like.

email showing in Yahoo inbox

View and print Yahoo Mail attachments without saving

The Problem

Yahoo Mail does not let you view attachments and print them like other email programs without saving them first. In order to view attachments full screen and print them, you are forced to save them onto your computer and then open them. This creates extra steps and leaves the clutter of all of your past attachments in your computer’s file system

email showing in Yahoo inbox
Typical email preview with the paperclip icon indicating an attachment

Description

The files are shown as colored square icons at the bottom of your email message. If you hover your mouse over the icon, you get the option to download the file. Click on the white letters that say download at the bottom of the icon.

download icon
Icon showing attachment

Video explanation

The next step is where the trouble starts. Instead of the document showing when you click on it or giving you the option to open it, you only have the option to save or cancel. This is assuming that you are using Google Chrome. The Edge browser may show slight variances in these two options but it still won’t let you open the file.

download icon
Save or cancel, no open!

Why it happens

The reason this is happening is because of the browser that you are using. Google’s Chrome and Microsoft’s Edge browser do not have the option to open files without saving them first. However, both Firefox and Internet Explorer browsers do let you open files. First, we will look at Internet Explorer.

Solution 1

The easiest solution is to use Internet Explorer. This program should already be installed on almost any Windows computer. You can find it on Windows 10 by going to all programs, Windows Accessories, Internet Explorer.

IE in the start menu
Internet Explorer in the Start Menu

Next, open up Internet Explorer and click on the colored rectangle icon to view your attachment. Now you get the option to OPEN it. Viola! If you open it, you can view and print it without saving.

download icon
Internet Explorer gives you the option to open the file

Solution 2

For a more secure solution, you can download the Firefox browser which will give you an up-to-date browser that has constant security and feature updates. Firefox is developed and maintained by the non-profit Mozilla Foundation.

DATEDIF function screen capture

Google Sheets – Calculate age with the DATEDIF function

DATEDIF function screen capture

Calculating age in a spreadsheet can be a painful process using many of the formulas floating around the web today. Dates act strangely in spreadsheets so care must be taken when working with them. Fortunately, calculating age can be done much easier using a single function in Google Sheets called DATEDIF. The DATEDIF function will return the difference between two dates in days, months, or years. Using these units in combination can get you a variety of output options.

Use the TIMEDIF add-on if you are working with dates and times.

Syntax

=DATEDIF(start_date,end_date,unit)

start_date Date at which to start the calculation

end_date Date at which to end the calculation

unit Type of output. Choices are “Y”,”M”,”D”,”YM”,”YD”, or “MD”.

  • Y – Number of whole years elapsed between start and end dates
    • YM – Number of months elapsed after the number of years shown with the “Y” unit. Will not exceed 11.
    • YD – Number of days elapsed after the number of years shown with the “Y” unit. No matter how many days after the last year, starts counting after end of last full year and is never over 364.
  • M – Number of whole months elapsed between start and end dates
    • MD – Number of days elapsed after the number of months shown with the “M” or “YM” unit. Can’t go higher than 30.
  • D – Number of whole days elapsed between start and end dates
Watch the video

 

 

Examples

Follow image below for the live Google Sheet with this data

 Live examples in Sheets

Go to this spreadsheet for examples of calculating age that you can study and use anywhere you would like.

Let’s say that you have three columns of data. As long as you have start and end dates, you are ready to go.

Columns for start date, end date, and name
Columns for name, start date, and end date

Now add 4 columns to the right for the DATEDIF formula with “Y”, “YM”, “YD”, and a column with them joined together. Remember that all of these are in the live Google Sheet shared above. The Y, YM and MD are used as the “unit” in each respective column. The “Y” column is showing the person’s age in years. The “YM” is showing the number of months that have elapsed since the last year shown. The “MD” column is showing the number of days that have elapsed since the last whole month.

Columns with new formulas added

 

Y, YM, and MD units added

 

There are other types of units as well. This next example uses M and MD. Note that the number of months goes over twelve since the years are not in the formula’s output. The column using MD as the unit is the same calculation as above.

Columns with M and MD unites

 

M and MD units

 

This last example uses just the D unit. If you are just using this function to calculate days, it would be easier to use a subtraction formula for the number of days or the DAYS function. Dates in spreadsheets are actually stored as integers so they can easily be added and subtracted. The last column, which is unlabeled, contains a subtraction formula.

Column the D unit

 

Just days

If you want to calculate and age and have it always be current when you open the spreadsheet, consider using the function called TODAY as your end date. TODAY returns the current day.

To just calculate the number of fractional years between two dates, consider using the YEARFRAC function.

To find weeks, use this formula.

Snipping Tool in the Start menu

How to insert a YouTube video link into a Google Doc with a thumbnail

They are many reasons why you may want to inserts a YouTube Video link into your Google Doc but there is no menu option for doing this. Following is a series of steps that will allow you to create a link to a YouTube video in your document complete with a clickable thumbnail. To the reader of the document, this will be an obvious YouTube link that looks like one from the web. When clicked, it will bring the reader to the video.

These steps give you a clickable thumbnail, but they will not embed the player into your document.

Screen clip

Start by finding the video that you want on YouTube. Once you have found the video, use the Snipping Tool built into windows and grab a screen clip of the video thumbnail.

Snipping Tool in the Start menu
Snipping Tool in the Start menu

To find the Snipping Tool hit your Start button and type “Snip”. Press enter once it is highlighted.

Save the snip to your computer.

Video explanation which is actually a video!

Insert the images

Go back to your Google Doc and place your cursor where you would like to insert the video. Go to Insert and then Drawing.

Insert drawing option
Insert drawing option

While you are in the insert drawing window, you will be inserting two images.

Insert image option
Insert image option

For the first image, use the upload option and choose the screenshot that you just took with the Snipping Tool.

Upload image option
Upload an image

After inserting your screen shot file, go back to Insert image, then More, and choose search. Search for “YouTube Play Button” and choose which one you would like.

Search YouTube button
Search for a YouTube button

All ready

Shrink this button and move it over the middle of the screen shot. Your drawing is now ready. You have a thumbnail pictures of your YouTube video that will take you directly to the YouTube video page with it ready to play.

Finished YouTube thumbnail image
Finished YouTube thumbnail image

Follow image below for the live Google Doc with a YouTube link

docs share icon