# COUNTIF: Excel formulas explained

Do you ever feel like you're drowning in data? As a marketer, I know that feeling all too well. Between Google Analytics, AdWords reports, and social media metrics, it can be hard to keep track of it all. Thankfully, Microsoft Excel can be a lifesaver when it comes to organizing and analyzing data. And one of the most useful Excel formulas for marketers is COUNTIF.

## What is COUNTIF?

Simply put, COUNTIF is an Excel formula that counts the number of cells within a range that meet a certain criteria. For example, you could use it to count the number of website visitors who came from a specific source, like organic search or a Facebook ad.

Let's say you have a spreadsheet with a column for source/medium and a column for sessions. You want to know how many sessions came from organic search. Here's how you would use COUNTIF:

1. Select a cell where you want the result to appear.
2. Type the equals sign (=).
3. Type the COUNTIF formula: `=COUNTIF(range, criteria)`.
4. Replace "range" with the cells you want to count.
5. Replace "criteria" with the condition you want to count. In this case, it would be "organic search".
6. Press enter and voila! Excel will give you the number of sessions that came from organic search.

That's the basic idea behind COUNTIF, but it can get more complicated depending on your data and the criteria you want to use. Here are a few more examples to show you what I mean.

## Examples of COUNTIF in action

### Example 1: Counting cells that contain a specific word

Let's say you have a spreadsheet with a column for blog post titles and a column for pageviews. You want to know how many pageviews came from blog posts that contained the word "SEO". Here's how you would use COUNTIF:

1. Select a cell where you want the result to appear.
2. Type the equals sign (=).
3. Type the COUNTIF formula: `=COUNTIF(range, "*SEO*")`.
4. Replace "range" with the cells you want to count.
5. Use asterisks (*) before and after the word "SEO" to indicate that you want to count cells that contain that word anywhere within the text.
6. Press enter and you'll get the number of pageviews from blog posts that contain the word "SEO".

Easy, right?

### Example 2: Counting cells within a date range

Let's say you have a spreadsheet with a column for date and a column for email signups. You want to know how many email signups you got during the month of May. Here's how you would use COUNTIF:

1. Select a cell where you want the result to appear.
2. Type the equals sign (=).
3. Type the COUNTIF formula: `=COUNTIF(range, ">=5/1/2019")-COUNTIF(range, ">6/1/2019")`.
4. Replace "range" with the cells you want to count.
5. Use greater than or less than operators (< and >) to specify the date range you want to count. In this case, we want to count dates that are greater than or equal to May 1, 2019 and less than June 1, 2019.
6. Press enter and you'll get the number of email signups from May.

These are just a few examples of how you can use COUNTIF to make sense of your data. The possibilities are endless!

## Other tips for using COUNTIF

Here are a few more tips to keep in mind when using COUNTIF:

• You can use the wildcard character (*) to match any text. For example, `=COUNTIF(range,"*mailchimp*")` would count cells that contain the word "MailChimp" anywhere within the text.
• If you want to count cells that meet multiple criteria, you can combine COUNTIF with the AND or OR functions. For example, `=COUNTIF(range1,"criteria1") + COUNTIF(range2,"criteria2")` would count cells that meet either criteria1 or criteria2.
• You can also use the NOT function to count cells that don't meet a certain criteria. For example, `=COUNTIF(range,"<>criteria")` would count cells that don't contain the word "criteria".

## Conclusion

As marketers, we're all about the numbers. But sometimes, those numbers can be overwhelming. That's where Excel formulas like COUNTIF come in handy. By using COUNTIF, you can quickly and easily count cells that meet specific criteria, giving you insight into your data that might otherwise go unnoticed. So the next time you're staring at a spreadsheet full of numbers, remember: COUNTIF is your friend.