Tuesday, March 12, 2013

How to create collapsible rows in Excel


how to group rows in excel
I was recently creating an Excel spreadsheet template for a friend and I needed to know how to create collapsible rows in Excel. I had a worksheet that listed student’s names and information. My friend wanted a +/- sign at the beginning of each row representing different groups of students that could be clicked to reveal grades for various classes. The Group function in Excel presented the perfect solution to this situation.

One method often used to collapse rows or columns in Excel is by using the Group function.

Go to the Data tab, select the rows or columns you want to group, then select the Group icon (located in the Outline are). This will result in a button being placed to the left of the row number column and allow you to instantly collapse or hide the grouped rows. To ungroup the rows simply hit the Ungroup button (also in the Outline area).

You can use keyboard shortcuts to improve your speed and efficiency when applying this method. First, select the Row or Column range, then;

To group:
<Shift> <Alt> <RightArrow>

To ungroup:
<Shift> <Alt> <LeftArrow>

To retain the Groups, but toggle hide/unhide the symbols:
<Ctrl> <8>
(Using the "8" that's under the function keys, *not* from the num keypad.)

Another option to group rows would be to apply Subtotals to your range.  You'll get those outlining symbols and even a subtotal row between each group. The Subtotals button is also in the Outline section of the Data tab.

I’ve created a short how to video to show you exactly how to collapse rows in Excel. Check it out below:

 

So that’s how you expand or collapse a group of cells in Excel. Pretty easy, huh?

-Nick

Easily Grouping Columns and Rows in Excel

Thursday, March 7, 2013

Printable Big Ten Tournament Bracket 2013

big ten tournament bracket 2013
I’ve never done this before but being a big fan of the Big Ten I’ve decided to create a printable Big Ten Tournament Bracket this year. The men’s basketball tournament begins on Thursday, March 14th in the heart of Big 10 country at the United Center in Chicago, Illinois. The cool thing about this editable Excel bracket is it includes the complete Big Ten basketball tournament schedule including all of the game times and television channels. Currently, I only have seedings listed. I will list the actual teams once they are known and then update the spreadsheet on Sunday.
 


Download the all in one bracket and Big Ten Tourney schedule here.

I can’t wait until the Big Ten Tournament starts! There are so many questions to answer: Will Michigan have an early exit? Is Indiana fading? What Minnesota team will show up? Can Iowa or Illinois spring an upset? How far can Ohio State go? With the way each of the top five teams have dropped random games they should have won this year I’d argue there is no clear favorite to win the Big Ten Basketball Championship. What do you think? I’d love for you to share your thoughts on the Big 10 tournament!


Check back soon for the 2013 March Madness brackets and download our new Excel Spreadsheets Help Android app!

Tuesday, March 5, 2013

Macro to Export Hyperlinks from Excel to Word


In this tutorial I am going to show you how to write a VBA macro to export hyperlinks from Excel to Word. I’m all about automation and efficiency and this is another real world example. I used this macro to quickly create a table of the world’s observation wheels for my latest website.

What you will learn by reading through this tutorial:

  • How to create a VBA macro to send data from Excel to Word
  • How to export hyperlinks from Excel
  • How to find the last row of data in an Excel sheet using a macro
  • How to paste hyperlink into Word using a macro
  • How to make a webpage from an Excel file

To begin, we have an Excel sheet with names in column A, some of them are hyperlinks to webpages and some of them are not. Hit Alt + F8 and create a new macro, I named mined Tables. It’s time to begin coding.
 
export hyperlinks from excel to word

 

The first thing we need to do is create a new instance of Microsoft Word and make it visible:

 

Dim appWD As Word.Application

Set appWD = CreateObject("Word.Application")

appWD.Visible = True

 

Next, let’s find the last row that contains data within our active Excel spreadsheet (my sheet is called “Data”):

 

Sheets("Data").Select

            Dim FinalRow As Integer

 

            FinalRow = Range("A9999").End(xlUp).Row

 

Now we add some error handling - if there is no data then quit the program, otherwise continue on:

If FinalRow = 0 Then

            Exit Sub

 

            Else

 

As a check, I like to have a message box pop-up displaying the total number of rows with data:

 

            MsgBox "Number of rows is " & FinalRow

 

Now it’s time to tell Word to create a new document. We’ll also add our header text by using TypeText. TypeParagraph inserts a new paragraph by going to the next line:

 

            appWD.Documents.Add

            appWD.Selection.TypeParagraph

 

            appWD.Selection.TypeText Text:="[table caption= List of Observation Wheels]"

 

            appWD.Selection.TypeParagraph

 

            appWD.Selection.TypeText Text:="Name,Height(m)"

Next, we’ll create a For...Next loop to cycle through every row and look to see if there is a hyperlink in column A. If there is a hyperlink, we want to copy it, if not then we still want to copy any text in the cell.

 

Dim hyperlink1 As String

Dim i As Integer

 

            For i = 2 To FinalRow

 

            If Range("A" & i).Hyperlinks.Count > 0 Then

 
 

            'if there is a hyperlink

 

            appWD.Selection.TypeParagraph

 

            hyperlink1 = Range("A" & i).Hyperlinks(1).Address

 

            appWD.ActiveDocument.Hyperlinks.Add Anchor:=appWD.Selection.Range,          Address:=hyperlink1, SubAddress:="", ScreenTip:="", TextToDisplay:=Range("A" & i)

 

            appWD.Selection.TypeText Text:="," & Range("B" & i)

 
 

            Else

 
 

            'If no hyperlink

 

            appWD.Selection.TypeParagraph

 

            appWD.Selection.TypeText Text:=Range("A" & i) & "," & Range("B" & i)

 
 

            End If

 

            Next 'i

 

Finally, we can add any text at the bottom of the document and close the if and sub statements.

 

            'end the table

            appWD.Selection.TypeParagraph

            appWD.Selection.TypeText Text:="[/table]"

            End If

            End Sub

create webpage from excel with macro
 

You may have noticed I began and ended with [table] and [/table]. I installed a Wordpress plugin on my website that enables me to easily insert sortable tables into my webpage without any major html coding involved. So now I can run my macro on my spreadsheet, copy the result it spits out into Word, and paste the text into my website. Here is the end result, a sortable table of all large observation wheels found throughout the world! Pretty cool huh?

Friday, March 1, 2013

Download the Apartment Comparison Android App

apartment comparison
To the fans of my wildly popular Apartment Search Spreadsheet, I just wanted to quickly let you know I’ve just released a brand new Android application called Apartment Comparison. It’s very similar to the spreadsheet but now in an easy to use format for mobile phones and tablets.The application is easy to use and comes with instructions.

The intended use of the app is to compare apartments by giving an apartment score to each. The score is computed when the user sets the importance of several key categories, such as location, community, utilities, etc. A bubble chart is then displayed for you to compare apartment score to monthly cost. The apartment with the highest cost might also cost twice as much as any other apartment, so maybe it is better to choose the second highest score because the cost is much less.

This apartment app can also be used as a simple apartments search checklist. There are 65 input fields divided up into seven different categories. To compare apartments you must first enter information for each apartment using the input screen. Data is entered in one of three forms: numerical keypad (for monthly expenses, move-in fees, etc.), Yes/No buttons (for things like if a microwave if present or not), or a rating from 1 to 10 (for things like your evaluation of the local school district).  I strongly believe we have literally thought of anything and everything you could wish to know about an apartment! 


I aim to make Apartment Comparison the best apartment hunting app available so if you do download it I would appreciate it if you rated the application and gave me any feedback or suggestions for improvements.
apartment comparison app

Wednesday, February 20, 2013

How to Embed Excel in a Website

One thing I wanted to learn when I created this blog was how to embed Excel spreadsheets into a website. Thanks to free file sharing services like www.box.com embeding files into websites has become a very simple process (and see why I highly recommend you create a website). The very first thing you need to do is to go and register an account at a file sharing website. I use Box.com because it’s free and has many unique features, like keeping stats of how many times your spreadsheets are viewed or downloaded. Once you have an account, follow these five easy steps once you have your Excel spreadsheet ready to upload:
 
Step 1: Create a folder
This folder is where you will upload your spreadsheet. OK, you actually don’t have to do this step but it helps to keep your files organized which is why I recommend you do it.

how to embed excel in a website



Step 2: Upload your spreadsheet to your folder
Go to your folder then upload your spreadsheet to by clicking Upload.

Step 3: Copy the markup

When the file is done uploading click the down arrow, scroll down to Share, then click Embed File in Your Site. Now you may adjust the width, height, and color as well as setting other options like allowing printing or downloading. When ready, click Copy to Clickboard to grab the embed code (or markup).


how to embed spreadsheet

Step 4: Go to your blog

The markup you copied is supported in many web authoring environments and blog services. Go to your blog editor, begin writing your post, then switch to HTML editing.


Step 5: Paste and post

Make sure the markup you copied is the most recent item in your Clipboard and press CTRL + V. You’ve just embedded an Excel spreadsheet into your website! See the example below:



Concluding Thoughts

There are other file sharing services you can use to embed a spreadsheet, like Microsoft’s SkyDrive and CometDocs, but I have had a great experience with Box.

-Nick
Spreadsheet Embedder

Sunday, January 20, 2013

Printable Super Bowl Squares 2013

The NFL playoffs are over and the final two teams are set to go at it in the championship game, meaning it’s time to download the printable Super Bowl Squares 2013 edition! The San Francisco 49ers will play the Baltimore Ravens in Superbowl XLVII (47) on Sunday, February 3rd. Do you want to make the big game even more fun? Start an office pool using our printable Superbowl square spreadsheet. Fill in the squares then watch the game (and laugh at the commercials) and see who wins. It makes watching the game more fun, especially if you don't care for the teams actually playing (Browns fans know what I'm talking about).


printable super bowl squares 2013

How to Play Superbowl Squares

Here are the instructions on how to play Superbowl Squares (which are also included within the spreadsheet 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.

Download the Super Bowl Squares Spreadsheet
To download click the link below, then click download.

 2013 Printable NFL Super Bowl Squares.xls 


Or if you want you can make your own and use my Superbowl sheet as a template to make your own Superbowl grid. Remember, football squares is mostly played during the Superbowl but you can use it for any other game too. Check out our download page for more sports spreadsheet templates. Who you got in the big game? The Browns suck and the 49ers knocked out my Packers so I'm going to have to go with them.

Wednesday, January 2, 2013

Printable 2013 NFL Playoff Bracket

2013 nfl playoffs bracket
The 2012-2013 NFL Playoffs are set to begin this Saturday, January 5 and I’ve created a printable bracket with Excel. After a crazy regular season that saw some of the best rookie play in league history (and to think my Browns could have easily gotten Russell Wilson!), the rushing record nearly fall to Adrian Peterson, Drew Brees incredible touchdown streak, and more. What was your favorite part?

I have created a printable playoff bracket complete with team logos. As a bonus, I've also included the complete 2012-2013 NFL Postseason Schedule within the bracket spreadsheet, including kickoff times and broadcast stations.Download the file below (hosted on box.com). I have to admit, I'm not even going to try to figure out which roman numeral it is.

Printable 2013 NFL Playoff bracket.xls download


If you enjoy this spreadsheet, please use the share buttons to send to your family, friends, and coworkers. Also, be sure to check back around January 20th, or the day after when the playoffs are over and I’ll be posting my Superbowl squares spreadsheet.

Get the 2014 Super Bowl Squares.