# Countif formula to return value for a month

Options
edited 12/09/19

Hi

How can I count how many times a certain text is present from reports coming in from different dates?

I have to count how many times the text is there monthly. ( the text is a site name visited )

Tags:

• ✭✭
Options

I just capture the name

=COUNTIF(Column1:Column1, "Text Capture")

If you are trying to capture text and capture it based on other criteria .. use the COUNTIFS

Is that what your thinking? If it isn't date dependant then you can just grab it by the text.

If I were trying to count how many times Blue was in a column

Name | Colors | Date

A           Blue      01-01-2019

B           Red      02-02-2019

C           Blue     02-01-2019

=COUNTIF(Colors:Colors, "Blue")

I hope that was right I'm multitasking.

• ✭✭✭✭✭✭
Options

You would need to use the COUNTIFS to be able to include both the specific text and the date criteria.

=COUNTIFS([Site Name Column]:[Site Name Column], "Site Name", [Date Column]:[Date Column], AND(@cell >= DATE(yyyy, mm, dd), @cell <= DATE(yyyy, mm, dd)))

Where the first DATE function is the starting date of your date range, and the second DATE function is the ending date of the range.

• ✭✭✭✭✭✭
Options

You can also pull by looking at the month and year directly.

=COUNTIFS([Site Name Column]:[Site Name Column], "Site Name", [Date Column]:[Date Column], AND(MONTH(@cell) = ##, YEAR(@cell) = ####))

• edited 12/18/19
Options

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!