# COUNTIF Question

✭✭✭✭

Is there a formula that allows me to count the number of cells within a range that contain a certain string of text, where the cells in the range also contain other text?

## Answers

• Dear White,

Try below logic, You can use multiple condition as mentioned below

COUNTIFS({Sheet Reference}, Cell Address, {Sheet Reference}, YEAR(@cell) = \$Cell\$1)

Example: COUNTIFS({My Tickets Range 1}, Area3, {My Tickets - Range 2}, YEAR(@cell) = \$Tickets\$1)

Use COUNTIF(for single condition) COUNTIFS (for Multiple Condition)

I hope the above formula will work.

Thanks and best regards.

• ✭✭✭✭

Thanks @Syed Abdul Majid however I'm not sure this will do what I require? I'm looking at a range of cells in one row e.g. [Example 1]@row:[Example 51]@row. And each of the cells in this range contains a string of text e.g. "ABC123" "ABC456" "DEF456" "DEF789". And I want to count how many cells in this range contain the letters "ABC".

• ✭✭✭✭

Thanks @Andrée Starå thats done it.

• ✭✭✭✭✭✭

Excellent!

You're more than welcome!

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!