Showing posts with label SUMPRODUCT. Show all posts
Showing posts with label SUMPRODUCT. Show all posts

Wednesday, October 7, 2015

Excel Quick Tips: Count Unique Values

I’ve got an extremely short but valuable Excel tip for you today: how to count the number of unique values in a range. Sometimes you need to count values in a row or column but not if they repeat. To count only the unique numbers or words in Excel, use the following formulas depending on:

If there are no blank cells:

=SUMPRODUCT(1/COUNTIF(Range, Range))

With or without blank cells:

=SUMPRODUCT((Range<>"")/COUNTIF(Range,Range&""))

Replace Range with A1:A7 for example. 


COUNTIF is probably the function you’re most used to that will count based on a given condition. SUMPRODUCT returns the sum of the product in the range.  SUMPRODUCT functions as an array formula, you just don't have to enter it as such. 

To see how this formula works step by step, click on the cell that contains the formula, then go to Formula tab, and click Evaluate Formula and you can cycle through each step in the calculation.




For more, see the index of Excel tips page.

Wednesday, December 5, 2012

NCAA Football Bowl Schedule and Pool 2012

2012 ncaa bowl college football predictions pool
The NCAA college football bowl season is finally here which means it’s time to make your picks and predictions about who you think will win each 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 favorite football team in a BCS bowl game. Make the occasion even more fun and competitive by trying to predict the NCAA football bowl games.

Use my spreadsheet template to create a college bowl pool with your friends or coworkers. Simply download the Excel file linked to below and follow the instructions included within the spreadsheet. The NCAA bowl pool also doubles as a printable college football bowl schedule. The spreadsheet is all set up and ready to go - simply make your picks and then watch the game to see who the winner is. It automatically keeps track of several different stats like how many games each person gets correct, what percentage of games you’ve picker correctly, and more!

How it Works

Altogether you do not have to enter or change any formulas or complicated functions to use the spreadsheet, I will briefly explain how it works in case you want to create your own from scratch or modify mine:

The college bowl spreadsheet uses drop down lists to allow the user to select a winning team. The number of games picked correctly is added using Excel’s SUMProduct function. Conditional formatting is used to color code correct picks from incorrect picks.

college bowl schedule 2012


Download the NCAA College Football Bowl Schedule and Pool

To download the spreadsheet simply click the link below which will take you to the box.com, where the file is hosted. Next, click on the “Download” link in the upper right hand corner. That’s it!

Download: NCAA Football Bowl Schedule 2012.xls (hosted on www.box.com)

Update 12/12/12: I uploaded a new version of the spreadsheet with a macro that automatically adds the correct number of columns and stats for the total number of players. To run the macro go to the Master Pool sheet and run the "AddPlayers" macro (by going to View>Macros>View Macros>AddPlayers>Run). After hitting run, enter total number of players into pop-up input box. Click OK then complete the rest of the template as usual.

Also, I’ve created a Google doc to start an Excel Spreadsheets Help NCAA bowl pool. To join, download the spreadsheet, make your predictions, then copy and paste your picks into my Google doc here:
https://docs.google.com/spreadsheet/ccc?key=0Av7RTFdlK3AmdFBwcHBINi1jUi1jdm1ZWTFtbWNuQkE

Final Thoughts

I’m sad to see my Buckeyes sitting on the sidelines this year (should have taken a bowl ban last year) although I’m hoping my Toledo Rockets can cap off the year with a good win. I’m a Big Ten and MAC guy so I’ll be pulling for each conference team but I have to admit I have almost no hope or confidence for any of them winning a single match up. What are your NCAA bowl predictions? What are your bowl picks? Leave a comment below and let me know! Like our Facebook page to receive notification when we post our NFL playoffs bracket and other sport templates.

-Nick
Go Rockets!

Sunday, December 6, 2009

How do I make a "contain" formula in Excel?

There a simple way to create a "contains" formula in Excel. It works the same way as the AutoFilter feature 'Contains'.

For one cell, you could use the SEARCH formula that returns the position on a string where you can find another string or an error. With some logical formulas you can make Excel return the value if it is present or not. Example:

=NOT(ISERROR(SEARCH("x",A1)))

In order to count in a range, you could use the SUMPRODUCT formula. This will return the number of cells that contains the "x" text in the A1:A10 range. Something like this:

=SUMPRODUCT(--NOT(ISERROR(SEARCH("x",A1:A10))))


This formula, which is a little bit of a longer formula, returns whether it contains ABCD.

=IF(ISERROR(FIND("ABCD",A1)),"False","True")

Or there is also this simpler formula, but will return TRUE if the cell DOES NOT contain ABCD

=ISERROR(FIND("ABCD",A1))

=FIND("what you are looking for", cell ) -- the output is the number of characters from the beginning of the cells value where it finds "what you are looking for". If it doesn't find it, it returns #Value.

=ISERROR(cell) -- output is whether that cell returns an error (such as #Value)

=IF(ISNUMBER(SEARCH(Exceptions!$J$2,Sheet2!A2)), "DELETE","")