# Countifs with index match and importrange

I am trying to count the number of instances each person has in each tab of sheet 2 and then import that total to sheet 1. Im unsure which formulas I should be using of if this is even possible. I've included a small description on each tab of sheet 2.

If someone could help me understand what I should be using to accomplish this I'd be grateful

• Have you figured it out yet? Sep 18, 2020 at 19:57
• I have not yet. Sep 18, 2020 at 21:09
• Have you tried any of the given solutions? Did any work for you? If not we should try finding out why. If yes, as per site guidelines when an answer addresses your question, you should accept it so others can benefit as well. Please remember that you can also contribute to this community that helps you. Sep 19, 2020 at 14:51
• I tried late last night when I was very tired and I was unable to get it to yield results. I will try again in a little bit. Sep 19, 2020 at 16:42

You can try this :

``````=query(
flatten(arrayformula(SPLIT(IMPORTRANGE("1kGJaIu6leOzeXWyAyfaZsllMib8b8esOuDWYwzlxyYo","concerns!b2:b"),",",true,true))),
"SELECT Col1,Count(Col1) group by Col1 order by Count(Col1) desc"
)
``````
• That worked to return counts, I should have been a little more clear, in Testing Sheet 2 column A is a fixed column of names, I'd like to return the count of the two tabs in Testing 1 to match the name in Column A of Testing 2, if that makes sense Sep 18, 2020 at 9:34

You mentioned:

...in Testing Sheet 2 column A is a fixed column of names, I'd like to return the count of the two tabs in Testing 1 to match the name in Column A of Testing 2

``````=ArrayFormula(IFERROR(VLOOKUP(C2:C,
In the formula I did not use `IMPORTRANGE`. It is very easy though. All you have to do is change the ranges to your needs like
from `errors!A2:A22` to `IMPORTRANGE("xxxxxx","errors!A2:A")`