Count number of rows in column A that have a value

2019-08-31 06:59发布

I have a list of 3 digit phone codes in EST timezone in column A Sheet 2. I have in Column A Sheet 1 another list of 3 digit phone codes from people that have called in.

What I am trying to do is in Sheet 1 "B2" count the number of inbound calls (Column A Sheet 1) that exist in the EST timezone list (Column A Sheet 2).

I cannot seem to find a way to complete this using either formulas or macros.

标签: excel vba
1条回答
虎瘦雄心在
2楼-- · 2019-08-31 07:23

You'll want something like this:

=COUNTIF(A:A,'Sheet2'!A##)

Just replace A## with the location of the 3 digit code from sheet 2 that you want to count.

EDIT: Here is the code which solves your question. It counts the number of times any value within Sheet2!A:A is iterated in Sheet1!A:A

=SUM(COUNTIF(Sheet1!A:A,Sheet2!A:A))
查看更多
登录 后发表回答