COUNTIF combined with AND

M. Cleaves

New Member
Joined
Jun 9, 2003
Messages
37
I'm wondering if it is possible to combine the COUNTIF formula with and AND.

For example, in two columns of data the first column contains one of 8 possible entries. Column two contains one of 4 possible entries (both regulated by a validation list).

I am trying to count the number of times one entry occurs in the first column in conjunction with an entry in the second column, for a total of 32 possible combinations.

The result need only be the number of occurences (as I will be further manipulating the data).

Following is an non-working example of the present formula:

=COUNTIF(AND('PENDING SHIPMENTS'!E2:E145,"100-1",'PENDING SHIPMENTS'!G2:G145,"RAW"))

Thank you in advance.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Try --

=SUMPRODUCT(('PENDING SHIPMENTS'!$E$2:$E$145="100-1")*('PENDING SHIPMENTS'!$G$2:$G$145="RAW"))
 
Upvote 0

Forum statistics

Threads
1,214,559
Messages
6,120,208
Members
448,951
Latest member
jennlynn

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
Back
Top