Tuesday, February 12, 2019

How to send email from Excel with link back to workbook

One of my most popular articles is where I showed how to create a hyperlink in an Excel spreadsheet that when clicked composes an email message. This method used only hyperlink and concatenate formulas; no VBA macros. It’s simple, easy to use, and not too complicated. But you can only do so much with this method.

Today, I will be using the more complicated method of using VBA macros to show how you can add a button to your spreadsheet that when pressed will automatically compose an email containing a link to the file location of the spreadsheet. I’m constantly sharing spreadsheets with friends of coworkers. I don’t know how many times a day I create a new email message, copy and paste a file location into the message, create the hyperlink to the spreadsheet, etc. This macro will help save you some time (and hopefully impress your coworkers in the process).

Setup Your Spreadsheet to be Able to Send Emails From Excel

If you’re going to send the email to the exact same people every time, you could just include the email addresses inside the vba code itself. But if the people change or someone who doesn’t know VBA needs to update it, this is not the best solution. What I like to do is add a helper sheet, and on this sheet list all the email addresses of who to include in the “TO” line and who to “CC.” This way anyone with no coding knowledge can easily change who the email is for.

VBA Macro to Compose Email with Hyperlink

Now it’s time to write the Excel macro. I’ll walk you through it step by step.

Sub Compose_Email()

I almost always add these to optimize macro speed:

Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual

Dim Wb1 As Workbook
Set Wb1 = ThisWorkbook

Declare variable names for the cells where the email addresses will be saved:

Dim SendTo1 As String
Dim SendTo2 As String
Dim cc1 As String
Dim cc2 As String

The email address are entered on SendList sheet, my “helper” sheet. As I said earlier, you can change email address without having to change VBA code because the macro refers to the cell’s location as opposed to entering the email address itself:

SendTo1 = Range("B1").Value
SendTo2 = Range("C1").Value
cc1 = Range("B2").Value
cc2 = Range("C2").Value

'back to the first sheet

Now get the name shown in the upper right hand corner of Excel to use as the signature:

Dim OwnerName As String
OwnerName = Application.UserName

Get the workbook name. We’ll use this as our email subject line:

Dim WorkbookName As String
WorkbookName = Wb1.Name

Get the location where the spreadsheet is saved:

Dim FileLoc As String
FileLoc = Wb1.FullName

Time to start Microsoft Outlook if it hasn't already been started:

Dim xOutApp As Object
Dim xOutMail As Object
Dim xMailBody As String

On Error Resume Next
Set xOutApp = CreateObject("Outlook.Application")
Set xOutMail = xOutApp.CreateItem(0)

The code will be slightly different for non-html email versus html email. For now, I am only going to show you how to do html email so we can easily link back to the spreadsheet. This is the body of the email. <br> is html code to go to the next line. Chr(34) is for quotation marks. This will make more sense once you run the macro and see the end result.

xMailBody = "Dear Team, <br><br>" & "I've updated the weekly financial report. Please check and sign this:" & "<br><br>" & _
"<a href=" & Chr(34) & FileLoc & Chr(34) & " > " & WorkbookName & " </a> " _
& "<br><br>" & "Thanks," & "<br><br>" & OwnerName

Fill in each section of the newly created email message:

On Error Resume Next

With xOutMail
.To = SendTo1 & "; " & SendTo2
.CC = cc1 & "; " & cc2
.BCC = ""
.Subject = WorkbookName
'.Body = xMailBody
.HTMLBody = xMailBody
.Display 'or use .Send

End With

On Error GoTo 0

Set xOutMail = Nothing
Set xOutApp = Nothing

Reset Macro Optimization Settings:

Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True

End Sub

Add a Button to Run the Macro

Finally, now that the code is done you can add a button to your spreadsheet by going to the Developer tab, Insert, Button (Form Control). Link your newly created macro to the button, customize the button text, and that’s all there is to it!

Watch how the macro works in the video below where I also walk you through it step by step:

I’ve made what I’ve shown into a simple template you can download here:

Compose Email with Link Example Spreadsheet.xlsm download here

I hope you find this example will make sharing spreadsheets with your coworkers easier. Let me know what you think about this template in the comments below.

Monday, January 28, 2019

How to find the values of diagonal cells in a table in Excel

Today I'm going to show you how to use the OFFSET function combined with Index and Match to find the values of diagonal cells in a table using my Super Bowl squares template as example.

Use the OFFSET function to find the value of a cell to the upper left, lower left, upper right, or bottom right of another cell. Let's say my name is in cell B2, the reference cell. To go up a row use -1, to go down a row use 1. Use -1 to go to a column to the left, +1 to go to a column to the right.

Upper left: =OFFSET(B2,-1,-1)
Upper right: =OFFSET(B2,-1,1)
Lower left: =OFFSET(B2, 1,-1)
Lower right: =OFFSET(B2, 1,1)

Now this is useful if you know the exact location of the reference cell, but what if that reference cell is always moving? That's where INDEX and MATCH come into play. A perfect example is taken from my Super Bowl Squares spreadsheet template. Watch the video below to see how I can get the values of the diagonal cells when the reference cell can change once I hit the randomize numbers button:

What do you think of that? Would you like to see more examples like this, taken straight out of a template? Let me know in the comments below.

Monday, January 21, 2019

Super Bowl Squares Template 2019 - SuperBowl LIII Grid Game

The match-up for the Super Bowl is set which means it's time to download your Super Bowl Squares Template 2019 edition. Surprise, not surprise: Tom Brady and the New England Patriots (man, I don't even have to update this year to year) will play the Los Angeles Rams in Super Bowl 53 on Sunday, February 3rdat 6:30pm. To make the big game more interesting you can start a football office pool using our printable Super Bowl spreadsheet

Fill in the squares, watch the game, laugh at the commercials, and see who wins and maybe make a little money at the same time (or help raise money for charity). If you’re a fan of a team like mine (the Factory of Sadness Hope) that will never make it to the championship (or even get a taste of the playoffs), then playing Super Bowl Squares will make watching the game more exciting and gives you something to actually root for. Others may be torn between cheering for their favorite team and cheering for their squares.

superbowl grid game print

This year’s Super Bowl Squares spreadsheet includes three different versions so you can choose the way you want to play:
  1. Printable version - This print ready version contains a blank grid, simply print it off and write all the player’s names down on the piece of paper. It’s quick and easy.
  2. Pick your own squares - Manage the office Super Bowl pool directly in Excel. In this version, each player gets to pick what squares they want. Once all are taken, press the randomize button to generate the random score numbers. No modifications are necessary, though you can if you so desire.
  3. Assign squares randomly - In this latest version, type each player's name in the manager sheet and use the drop down menu to assign how many squares to give each player. Then click the Assign Names Randomly button and it will automatically populate the grid with all of the names.

Super Bowl Squares Rules & How to Play

Listed below are the basic instructions on how to play Super Bowl Squares (which are also included within the spreadsheet for the three different versions, along with an example):

  1. Participants “purchase” individuals squares by writing their name in their desired squares, until all one hundred are filled.
  2. After all squares are taken, the numbers 0 through 9 are written in the empty horizontal and vertical rows in random order (draw the numbers out of a hat).
  3. After the end of each quarter of the game, match the last digit of each team's score to the corresponding square to find the winner.

Tip: 0, 3, and 7 are the best numbers to get. 8, not so much.

Added again this year is the option whether to keep the same random numbers chosen for all four quarters or to have four different sets of random numbers for each quarter. Using the rotating quarters method, someone could theoretically still get the number 3 for all four quarters, though that’s not very likely, or four different players could each get a 3 for different quarters.

squares excel spreadsheet

Below is a short video tutorial I put together of how to use my Super Bowl Squares template in Excel.

Super Bowl Squares Template 2019 Download

The beauty of this football bowl manager is you will not have to change or modify any formulas yourself (unless you want to of course). Instructions are included within the Excel file and shows you exactly how to add more players (either manually or by using the button that is linked to a macro). If you enjoy using this sheet football pool manager I would really appreciate it if you would share it with friends, family, and coworkers. 

To be notified when any updates are made to the file or to get a notification when next year's template is available, download using this link(requires an email address):

Download the Super Bowl Squares Template 2019.xlsm file here

Please let me know in the comments or by email which version you'll use to play - printable, pick your squares, or randomly assign names. Or if you have any requests for modifications shout me out!

Monday, December 3, 2018

2018 College Football Bowl Prediction Pool Manager with CFB Playoff Bracket

The college football conference championships were played this past weekend which means the 2018 NCAA college football bowl season is here again! Therefore, it’s time to make your picks and predictions about who you think will win each bowl game. One of the best times of the holiday season (other than giving and receiving gifts) is gathering around the TV and rooting for your Alma mater or hometown football team. This year has the added bonus of not just single bowl games but the fifth year of a four team playoff to determine the national champion.

Features for this year's bowl prediction pool over the previous college football bowl pool manager spreadsheets include the following:
  • Easy method to make each bowl game worth a different point value, so the national championship game and semi-finals can be worth more points, or however you want to customize it.
  • Updated leaderboard tab with new stats
  • Separate entry sheet to pass out to participants or co-workers that can be imported by a macro
  • Complete NCAA college football bowl schedule with game times and TV stations
  • New stat sheet to track each conference's record during bowl season (Go Big Ten! Go MAC!)
  • The bowl prediction sheets include the football helmet designs for every team (taken from the 2017 college football helmet schedule spreadsheet), their win-loss record, and the logo for all bowl games. I added the helmets so those players who aren't big college football fans can pick a winner based on their favorite helmet design!
  • If you click on one of the helmets it should take you to that team's ESPN page so you can learn more about them and see which teams they won or lost to.
  • Download the CFP Pool Manager and Single Entry Form here.

There are now three ways to add participant’s data:
  • Manual entry using the drop down lists
  • Copy and paste from the selection sheet to the bowl manager
  • Use the import macro to automatically import a player’s data into the pool manager by way of a macro
Below is last year's video of how to use the bowl pool manager spreadsheet.

The beauty of this football bowl manager is you will not have to change or modify any formulas yourself (unless you want to of course). Instructions are included within the Excel file and shows you exactly how to add more players (either manually or by using the button that is linked to a macro). If you enjoy using this sheet football pool manager I would really appreciate it if you would share it with friends, family, and coworkers.

I am working a version where you can add confidence picks by ranking the bowls in order of how confidence you are with your picks. I did one for 2017 but have not updated 2018's for this yet.

Here are some of my Bowl Game Observations that may interest only me...
  • Unlike two years ago when there were four teams with losing records, there are none this year, though there are a ton of 6-6 teams (yawn).
  • Last year, there were no undefeated teams in the four playoff spots (UCF was undefeated). This year there are three undefeated teams (and undefeated UCF got left out again).
  • Biggest gap of match-up between number of wins is 10-2 Cincinnati vs 6-6 Virginia Tech.
  • Can you name all 8 teams who have won 11 or more games this year without looking? Four are obviously in the playoff, but what about the other four? One is surprising.

Please let me know if you have any questions, comments, find any bugs, or have any suggestions for improvement. I love that people are using this Bowl Prediction Game to help raise money for charity, that's so awesome to hear! What team are you rooting for?

Tuesday, November 20, 2018

2018 Holiday Gift Guide for Microsoft Excel Users

The 2018 holiday season is officially upon us here in the United States which means it’s time for my annual gift giving guide. I used to panic every year whenever my spouse, parents, and siblings asked me what I wanted for Christmas. I needed to give them an idea otherwise I’d end up with an ugly sweater or some random gadget I would never use.

So to help alleviate some of my stress I started compiling my own holiday gift guide. It’s kind of like the big toy catalog you used to get as a kid, only this is for adults. I’ve made a list of items I think would be very useful or exciting for your fellow Excel users, sorted by different categories. Some of these items I already use on a daily basis and others are things that are on my own personal wish list. It's my biggest and best gift guide yet! Enjoy!


Excel 2016 Bible - The complete guide to Excel 2016, from Mr. Spreadsheet himself! Whether you are just starting out or an Excel novice, the Excel 2016 Bible is your comprehensive, go-to guide for all your Excel 2016 needs. Whether you use Excel at work or at home, you will be guided through the powerful new features and capabilities by expert author and Excel Guru John Walkenbach to take full advantage of what the updated version offers. Learn to incorporate templates, implement formulas, create pivot tables, analyze data, and much more.

Excel 2016 Power Programming with VBA is fully updated to cover all the latest tools and tricks of Excel 2016. Encompassing an analysis of Excel application development and a complete introduction to Visual Basic for Applications (VBA), this comprehensive book presents all of the techniques you need to develop both large and small Excel applications. Over 800 pages of tips, tricks, and best practices shed light on key topics, such as the Excel interface, file formats, enhanced interactivity with other Office applications, and improved collaboration features.

If you’ve ever thought to yourself “there has to be a better way to do this,” while using Microsoft Excel, then know you're probably right. There probably is a better way to complete your tasks you just don't know what it is and you don't have time to read a boring, expensive, thousand page manual on how to use Excel. 76 Excel Tips to Increase Your Productivity and Efficiency is for you. No fluff, just Excel tips and tricks you can put to use right away.


Will It Fly? How to Test Your Next Business Idea So You Don’t Waste Your Time and Money by Pat Flynn. I’ve been following Pat’s blog and podcast for a number of years, and you might have seen some of his tips at work on my site. If you’re new to the online business world, this book is fantastic. Lots of practical steps to take to prove whether your idea has validity or not. Over 700 reviews and a five star rating, that's impressive!

The Martian by Andy Weir. If you only read one (fiction) book this year, The Martian has to be the one. I absolutely love this book (and it’s even better than the movie). As soon as I finished it the first time, I immediately re-read it – something I’ve never done before. It’s about an astronaut (with a great sense of humor) who gets left behind on a mission to Mars and has to figure out how to survive. If you’re interested in space exploration, problem solving, engineering, chemistry, botany, or disco + 70s TV shows, I highly recommend you read The Martian. Maybe the best book I’ve read in the past five years.

Another quick, shameless self-plug. Where are the most terrifying roller coasters found? Who designs them? Which park builds the craziest rides? Find out by reading my book 50 Groundbreaking Roller Coasters. Another reason for including this book on this list is to show you a real life usage of Excel. How's that? Because this is one of the books I wrote using an Excel spreadsheet!

Nowhere in the world is there a more bizarre theme park than Happy Fun Land. Nike Farmington’s twelve years of thrill-seeking and roller coaster riding has brought him to exotic locales like Perth, Australia, Kaatsheuvel, Netherlands, and Santa Claus, Indiana. He's marathoned a roller coaster for ten consecutive hours and conquered the world’s tallest and fastest. Yet nothing has prepared him for the insanity of Happy Fun Land and it’s mind blowing attractions: a drop ride with no brakes and a death simulator, just to name a few. Will Nike survive his hilarious adventure through the world's craziest theme park? I thought this book was hilarious and I think you will too!

Tools for the Job

Excel Quick Reference Sheets - Laminated quick reference showing step-by-step instructions and shortcuts for how to use Microsoft Office Excel 2016 (Windows Version). Written with Beezix's trademark focus on clarity, accuracy, and the user's perspective, this guide will be a valuable resource to improve your proficiency in using Microsoft Excel 2016. This guide is suitable as a training handout, or simply an easy to use reference guide, for any type of user.

TechSmith Snagit takes the hassle out of creating images and videos. Capture your screen, edit images, and deliver results. Snagit is also the only screen capture tool with built-in advanced image editing and screen recording. So you can easily create high-quality images and videos all in one program. Quickly explain a process, build visual-based documentation and be more engaging by adding images and videos to your communications. It's the tool I use to create all the images for Excel Spreadsheets Help and well worth the price.

Microsoft Surface Tablet. Need to use Excel on the go put don't want to lug around a larger laptop? A Surface tablet is great way to go.

Dimmable Eye-care LED Desk Lamp. A great lamp and exactly what I was looking for in a new clip on lamp for my drafting desk. It has six different light settings so I can find the right lighting for all of my needs. It is well built, works great besides being stylish.Besides using at work can use at home as a reading lamp too.

Keyboard Case for Tablets. How do I get so much done, especially when I’m traveling on the road a lot? I use a combination of a Samsung Galaxy Tablet and my new Keyboard case. They’re small so I can take it almost anywhere and the keyboard allows me to do things like type out this blog post, reply to your email questions, and write Excel macro code.

USB Heated Mouse / Hand Warmer. I'm not sure about you but the office at my day job can get really cold during the winter, especially after weekends or holidays. One solution I've found that helps is a heated mouse to keep you hand warm while not impacting my ability to get things done.

Laptop Privacy Screen Protector. Whenever I visit a customer I always take my privacy screen protector for my laptop. It keeps your personal or confidential information safe from prying eyes as you’ll see the information on your display while people on either side only see a darkened screen. If you’re ever on an airplane or in a coffee shop and feel like your neighbor is constantly looking over your shoulder at your screen then you need to get one of these today!

A good quality laser point. This laser pointer always comes in handy when it’s time for a meeting or presentation. Plus, it doubles as a toy to keep your cats entertained.

Rocketbook Smart Erasable, Reusable Wirebound Notebook with Penstation – the last notebook you’ll ever need!

Krieger Plug Adapters (Most of Europe (type C)) - If you're going to do some international travel I highly recommend taking this adapters with you. They come in a pack of four so you can share when your travel buddy forgets his.

Toys, Tech, Gadgets, and Others

Handheld Gimbal Stabilizer for Smartphone – Outside of this website, in my spare time I like to make and edit videos and montages (mostly of my family). It’s easiest just to use a cellphone but the video is often shaky due to my unsteady hands. So I decided to get a gimbal and I’ve had fun playing around with it.

Anker PowerCore Fusion - This is a portable power charger that plugs directly into the wall so it works as your regular charger, but is also a battery so you always have power on the go.

In my little free time from working and being a dad, I like to play around with my Samsung Gear VR headset. Virtual Reality is really taking off and the technology is getting much better. Though be warned it may cause motion sickness if the app you’re looking at doesn’t perfectly track your head movement.

Solar Powered Christmas Lights. I love putting up Christmas lights and trying to out-do my neighbors, but I have to admit I feel a little guilty about using the additional electricity. Luckily I found these solar powered Christmas lights and they actually work very well! They’re environmentally friendly and they automatically turn on and off each night. They also don’t have to be attached to a power source so I can put them in areas I normally couldn’t string lights.

Dash and Dot – programmable robots. If you’re into programming things like Excel macros and you want to teach your kids the joys of programming then I’ve found the perfect gift for you. These cute robots are designed to help introduce children to the wonderful world of programming. Oh, and they’re fun for adults too! Can’t wait to use this with my son in a few years. For now he just likes watching me drive it around with my phone.

Fitbit Alta. Let’s face it – us engineers nowadays sit in front of a computer a lot. I didn’t realize how much I wasn’t moving until I started wearing a Fitbit. It now helps me to stay motivated by tracking all-day activity like steps, distance, calories burned and active minutes so I can stay healthy for my family. When I’m sick I can’t answer your Excel questions and help you out, so I use Alta to help stay in shape and on top of my game!

Amazon Prime Membership. If you haven’t joined Amazon Prime yet, why not? I do almost all my shopping online and I get free two-day shipping on nearly everything. You can also borrow books, watch movies, and stream music. Get your Prime Discounted Monthly Offering here.


Are you putting any of these items on your holiday wish list? If so, let me know which ones in the comments below. Do have anything you’d like to recommend to me?

Friday, July 13, 2018

2018 NFL Helmet Schedule Spreadsheet

2018 nfl helmet schedule spreadsheet download

Available to download now is the 2018 NFL helmet schedule spreadsheet. You’ll see a comprehensive breakdown of every NFL pro football team's 2018 season schedule with an image of each team’s helmet design.

There are two different sites you can get the sheet from.

1. Email required to download. I do this so you will be automatically updated you if changes or additions are made and will update you when the next year’s schedule is ready.

2. No email required (no notifications): I know some people don't like giving out their email so I've made this option available. However, you won't be notified if I update the sheet.

The NFL helmet schedule is printable too. You can save the spreadsheet as a PDF file or print it out and pin it up in your cubicle at work. If you do, please email or tweet me a picture of it hanging up - I'd love to see it!

As always, I welcome any comments or suggestions about how to fix or improve the sheet! How can I improve this spreadsheet into something you’ll use all the time during pro-football season? What future features would you like to see?

Looking for the college football helmet schedule?

Thursday, June 28, 2018

2018 College Football Helmet Schedule Spreadsheet

The 2018 college football season will be here before we know it! I still can’t believe my Buckeyes got shut out of the college football playoff last year, but hey, I’ll take a win against USC any day.

I really have no idea what to expect this season. I always have fun looking at the 2018 college football helmet schedule to try to predict which games I think my favorite team will win or lose.

This spreadsheet of the college football schedules includes every team from all conferences plus independents. Every game is listed as either home, away, or neutral site (noted at the bottom of each sheet). A college football helmet schedule spreadsheet may be available on other websites but, to my knowledge, this is the only downloadable Excel version and, unlike some of the others, is 100% FREE!

college football games spreadsheet in excel

For the second year in a row I’ve used macro automation to automatically create this sheet - no more manual copying and pasting for hours with many mistakes. The schedules are imported directly from ESPN (so if there is a mistake blame them!).

The first time I uploaded this sheet, I messed up. The pictures were linked to all the helmets saved in a folder on my desktop. When you opened the spreadsheet on another PC, none of the helmets showed up. I made a mistake in my macro.

I originally used:


I had to change the VBA to AddPicture in order to make embedded pictures instead of linked pictures.

myLeft = rng.Left + (rng.Width / 2) - 25

myTop = rng.Top + 45

If FileExists(path) Then

Dim p

Set p = ws.Shapes.AddPicture(path, False, True, myLeft, myTop, 60, 55)

AddPicture creates a picture from an existing file. Returns a Shape object that represents the new picture.

I’m happy to say this year’s sheet contains 245 different college football team helmets! It’s surprising how small the file size is when considering how many helmets there are.


Below are two separate download options for you. Email required download link (to automatically update you if changes or additions are made and will update you when the next year’s schedule is ready)


No email required (no notifications):


As always, I welcome any comments or suggestions about how to fix or improve the sheet! Let me know if and how you’re using the sheet.

Looking for the NFL Helmet schedule?