# How do I do a COUNTIF on another table column in Numbers?

I am on 2014 Macbook Pro running Mavericks.

I have two tables.

In table 1, I have a cell that should store the number of cells in column A of table 2.

In the same table 1, I have a different cell that stores the number of cells in column E of table 2 that matches the text "MATCHED".

How do I write the formula for each case?

The great thing about numbers is they offer a great how-to guide. If you don't know how to do something then all you have to is start typing a formula and it will begin to auto populate, click on it and the functions sidebar will open with the function. it will give you examples, what the parameters are etc.

That's just a tip, but your lucky I'm here:

Since you didn't specify what you want the cell of Table 1 to count in the column of table 2 I just counted all non-blank cells. You can alter with whatever text based of the `countif` function in the second example that compares against a string:

1 : Table 1 Cell that stores number of cells in column A of Table 2. As described since you didn't specific I just counted all non-blank cells :

``````=COUNTIF(Table 2::A,"<>"&"")
``````

2 : Table 1 Cell that stores number of cells in Column E of Table 2 that matches text "MATCHED" :

``````=COUNTIF(Table 2::E,"MATCHED")
``````

Instead of typing you can just do this:

Type into the cell = then type COUNTIF then click on the column header (E) it will select the entire column, then click on condition and type "MATCHED" then press enter! Your outcome will be based off this :

• This works great. Just one more follow up question. Why is it you use "<>"&"" for any non empty cells? I understand "MATCHED" though Jan 28, 2015 at 2:50
• @KimStacks it's just an excel habit that translates nicely to Numbers that considers all values text,dates,numbers. Alternatively, the 'easier' way of writing that would be COUNTA which does the exact same thing without the `"<>"&""` syntax, it's just a habit sorry. Jan 28, 2015 at 3:18