Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNT IF in array
Hi
I have the following data: A B 22 Cat 29 Bat 22 Tax 24 Bat 22 Cat I want to calculate the total number (COUNT) of the occurences of "Cat" in Column B, where Column A's value is "22". I.e. the answer to the above example will be 2. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNT IF in array
Try this:
=SUMPRODUCT(--(A1:A5=22),--(B1:B5="cat")) Better to use cells to hold the criteria: D1 = 22 E1 = cat =SUMPRODUCT(--(A1:A5=D1),--(B1:B5=E1)) -- Biff Microsoft Excel MVP "WildWill" wrote in message ... Hi I have the following data: A B 22 Cat 29 Bat 22 Tax 24 Bat 22 Cat I want to calculate the total number (COUNT) of the occurences of "Cat" in Column B, where Column A's value is "22". I.e. the answer to the above example will be 2. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNT IF in array
Hi,
You may also try the following array formula (Ctrl+Shift+Enter) COUNT(IF((D3:D7=22)*(E3:E7="Cat"),1)) -- Regards, Ashsih Mathur Microsoft Excel MVP www.ashishmathur.com "WildWill" wrote in message ... Hi I have the following data: A B 22 Cat 29 Bat 22 Tax 24 Bat 22 Cat I want to calculate the total number (COUNT) of the occurences of "Cat" in Column B, where Column A's value is "22". I.e. the answer to the above example will be 2. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count in a cell, not an array | Excel Worksheet Functions | |||
If, Count & Array | Excel Worksheet Functions | |||
COUNT and IF Array | Excel Worksheet Functions | |||
Count & Array Function | Excel Worksheet Functions | |||
Count if array contains cells of a certain value | Excel Worksheet Functions |