or Explore Discussions

# Countif Function where criterion is content of a cell

05/26/20
Answered - Pending Review

Hi All,

I need some help with a countifs functions

I want the formula to provide me with the count of the cells that contain a specific text.

Is there a way to point directly to the cell that contains that text rather than spell it out ?

For example

=COUNTIF([Column A]:[Column A], "Text") This works fine, but I would want the formula to be something like

=COUNTIF([Column A]:[Column A], <Cell Content>)

The reason for this is that it will be easier to scale it throughout the text to count different cells content without having to spell it each time...

Thank you

Stefano

• .... and I've answered myself ... guess I had a "doh!" moment

=COUNTIF([Column A]:[Column A], [ColumnA]1) (assuming A1 is the cell I want to use.

:)

• ✭✭✭✭✭
edited 05/26/20

Glad you got it working!

A tip, you can change the row numbers to @row, so you don't have to think about which row number you're on.

Something like this.

```=COUNTIF([Column A]:[Column A], [Column A]@row)
```

I hope that helps!

Be safe and have a fantastic week!

Best,

Andrée Starå

Workflow Consultant / CEO @ WORK BOLD

Please help the Community by marking your post with the accepted answer/helpful. It will make it easier for others to find a solution or help to answer!

SMARTSHEET PARTNER & CONSULTANT / EXPERT

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

W: www.workbold.com | E: [email protected] | P: +46 (0) - 72 - 510 99 35

Feel free to contact me about help with Smartsheet, integrations, general workflow advice, or something else entirely.

• Thanks Andrée ,

so the @row will point the function to the row I'm typing in, right?

that is a handy feature.

I guess the only limitation is if the cell I need to use as criterion is not on the same row.

Thanks again

• ✭✭✭✭✭

Happy to help!

Yes, @row will always check the row it's on.

SMARTSHEET PARTNER & CONSULTANT / EXPERT

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

W: www.workbold.com | E: [email protected] | P: +46 (0) - 72 - 510 99 35

Feel free to contact me about help with Smartsheet, integrations, general workflow advice, or something else entirely.