Showing posts with label functions. Show all posts
Showing posts with label functions. Show all posts

Monday, April 3, 2017

Counting in Excel

There are three simple COUNT functions if you need to count cells in Microsoft Excel. There are two additional COUNT functions (COUNTIF and COUNTIFS) that are a little more complex and require multiple arguments. For this post, I'll only focus on COUNT, COUNTA, and COUNTBLANK.

=COUNT(value1,...)
This function counts the number of cells in a range that contain numbers. If the cell contains any alpha character, it will not be counted. The arguments can be a single cell, range of cells, or a non-contiguous range of cells (multiple arguments).

=COUNTA(value1,...)
This function counts the number of cells in a range that are not empty. Think of the A as ALL. I want a count of ALL cells that contain something. The "something" can be any character, as long as the cell is not empty. The arguments can be a single cell, range of cells, or a non-contiguous range of cells (multiple arguments).

=COUNTBLANK(range)
This function counts the number of empty cells in a specified range of cells. If someone used the SPACEBAR to "clear" a cell, this function will recognize the space as a character and count it. It truly means the cell has nothing entered in it.

Monday, February 1, 2010

Excel: Calculate the difference between two dates

Let me just get this off my chest. "I don't do math in my head." I really hate math, but Excel is a dream as it makes math so easy. I used to have to really think how old my family members are. It is a really bizarre thought process for me, so I won't bore you with that. Instead, I'll show you how I made an Excel spreadsheet that will tell me. I have since used it to calulate days, months or years between two dates (such as time between start and end dates of a project).
Here is the formula's syntax. (BTW, don't go looking this up in the Help section as it is a "secret" formula.)
=DATEDIF(Earliest_Date, Latest_Date, UnitOfMeasure)
Here's how it works...

1st argument: A2 is the cell reference for the early date.

2nd argument: For the late date, I used the TODAY() formula so it is dynamic for whenever I open the spreadsheet to have the current date.

3rd argument: The unit of measure can be either "Y" for years, "M" for months or "D" for days, depending on how you want the results to be calculated.
If you prefer to calculate the WORKING days (excluding weekends and holidays) you can use the NETWORKDAYS formula.
=NETWORKDAYS(start_date, end_date, holiday_range[optional])
Here it is in action...


Tuesday, November 10, 2009

VLOOKUP(), MATCH(), and OFFSET()

Some people are aware of the VLOOKUP function, but not as many are familiar with MATCH and OFFSET. If you use VLOOKUP, you should learn about the other two as they may come in handy when the other doesn't quite fit your need.

Instead of recreating the explanation, here is a simple and easy to understand explanation from Chandoo, MVP (@r1c1).

Saturday, November 1, 2008

Excel 2007: Change the Case of Text

Converts text to uppercase.
=UPPER(text or cell reference of text)

Converts all uppercase letters in a text string to lowercase.
=LOWER(text or cell reference of text)

Capitalizes the first letter in a text string and any other letters in text that follow any character other than a letter. Converts all other letters to lowercase letters.
=PROPER(text or cell reference of text)