• 100% Satisfaction Guarantee
Jess M., Computer Support Specialist
Category: Microsoft Office
Satisfied Customers: 6964
Experience:  Computer Software Specialist for more than 10 years
49766785
Type Your Microsoft Office Question Here...
Jess M. is online now

# I have two ranges of information, given that a criteria is

I have two ranges of information, given that a criteria is met in range B, I want to count the number of matches in range A....
Hi, welcome and thank you for your question. My name is XXXXX XXXXX I am glad to assist you today.

Can you give me a copy (just use dummy data or remove confidential info) of the Excel file you are working on? If this is possible, you can upload the file to this link below:

http://wikisend.com

Best regards,
Jess
Customer: replied 4 years ago.

the file number is XXXXX

Terence,

I got the file. Are you working on the JE Tracker sheet? Also, can you please tell me these info:
3. Lastly, what criteria do you need that will count the matches in range A when it is met in range B?

Best regards,

Jess

Customer: replied 4 years ago.

Range B is column G on sheet 'Corporate JEs' June

Range A is column F on the same sheet

I want to count the number of documents in colum A for a corresponding close day i.e. -4, -3, 2, 3 in colum B

Terence,

The 'Corporate JEs' June is protected. Can you give me a copy of a file with a non-protected 'Corporate JEs' June sheet?

Jess
Customer: replied 4 years ago.

Thank you for that information. Please give me a moment to figure this out. I will be back with the results. I am working on this now.

Jess
Customer: replied 4 years ago.

Thanks

Hi Terence,

Thank you for patiently waiting. I have completed the revised file to do the count for you. In this scenario, we need to use an array formula in order to count using multiple rules. That is, only count the data in F if the criteria for G is satisfied.

I do not know where you intend to display the count results so I just placed it at the buttom of column F. The formula I used is:

=SUMPRODUCT(--(F8:F207<>""),--(G8:G207=G209))

Please note that I used a reference to G209 for the criteria for column G. If you want to hardcode it to the formula, just change G209 to that filter criteria like:

=SUMPRODUCT(--(F8:F207<>""),--(G8:G207=4))

That will count non-blank cells in F where G is equal to 4.

There are limitations here and that includes the necessity that column F shall be set to numbers.

Here is the completed file: