简体   繁体   中英

Count number of rows in column A that have a value in a list in column B on worksheet 2

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.

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))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM