COUNTIF Function

D

Duane

Hello,

I am new to Excel and wondering if I could get some assistance on the
COUNTIF function or other more appropriate funtion.

I am exporting data from an Access database to an Spreadsheet. What I would
like to do is count the rows in the spreadsheet. The trick is that one of
the fields has 5 different assessment types of data that can be entered.

Adult
Adult Refusal
Re-Entry
Re-Entry Refusal
Other Facility

There may be 200 rows of data but each row will have one of the five
assessment types. I want to count all the rows except the Adult Refusal and
Re-Entry Refusal.

I tried to use the COUNTIF fucntion and it works fine for one criteria, but
I can't seem to figure out how to add a second criteria. Is it possible to
use multiple criteria or should I try to use a different function.

I could just create another recordset in my database to count the rows based
on my criteria and then populate the designated cell with the results. If
it is possible, I would like for Excel to do the counting so I don't have to
transfer so much data.

Thanks in advance.
 
D

Don Guillett

Try this idea
=SUMPRODUCT(($B$2:$B$22={"adult","Adult Refusal","etc","etc","etc"})*1)
 
D

Dave Peterson

Another one:

=SUM(COUNTIF(A:A,{"Adult","Adult Refusal","Re-Entry",
"Re-Entry Refusal","Other Facility"}))
 
S

ShaneDevenshire

Hi,

You could also enter the items you want to count in a range, say F1:F3, and
then use the formula:

=SUMPRODUCT(COUNTIF(A1:A300,F1:F3))

and I believe the formula below, needs to be slightly modified to match your
request
=SUM(COUNTIF(A:A,{"Adult","Re-Entry","Other Facility"}))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Countif, index and match 2
countif 4
Excel Need Countifs Formula Help 0
COUNTIF With two criteria 5
Countif time syntax 6
Access Dcount (multiple criteria) 3
count with data filters on 7
Excel Countif cell has diagonal border 6

Top