using the AND and the COUNT?

mark gardner

Board Regular
Joined
Sep 6, 2006
Messages
52
if I have one column (a1:a10) with either an A or B in the cells and a second column (b1:b10) with either a C or a D in the cells, what would be my function that would check the 2 columns and return a value that represented how many rows had a specific combination such as A & C side by side in them? I am stuck.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
=SUMPRODUCT(--(A1:A10="A"),--(B1:B10="C"))

IMPORTANT RULES
Ranges cannot be entire column refs like A:A, must specify row #s like A1:A100
Ranges must be same size
you can use Cell Refs for the variables like:

=SUMPRODUCT(--(A1:A10=C1),--(B1:B10=D1))

C1=A
D1=C

Hope this helps...
 

Watch MrExcel Video

Forum statistics

Threads
1,129,754
Messages
5,638,170
Members
417,011
Latest member
Amaden95

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top