Excel Help with a formula

I have  a sheet that I need to do some counts on based on some text values.

I can count this way - =COUNTIF(B8:B12,"=n-****"). And I can count this way - =COUNTIF(E8:E12,"=p")+COUNTIF(E8:E12,"=t")+COUNTIF(E8:E12,"=e").

What I need to do is have something like this - IF(B8:B12,"=n-****")=COUNTIF(E8:E12,"=p")+COUNTIF(E8:E12,"=t")+COUNTIF(E8:E12,"=e")

Any help would be appreciated.
LVL 2
Mark WoodNetwork AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongCommented:
I don't quite understand your problem, what is "n", "p", "t", "e", etc ?

Do you have a sample excel can upload and indicate your issue accordingly?
0
Mark WoodNetwork AdministratorAuthor Commented:
the n-**** is the id number
p = present
t = tardy
e = excused

so if the usersID = n-**** then count the cells that have "p" "t" & "e" in them
0
Mark WoodNetwork AdministratorAuthor Commented:
Here is a copy of the file
Church-Attendee-List-Plus---EE.xlsx
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Ryan ChongCommented:
I guess you need to use CountIFS to allow multiple criterion, like:

=COUNTIFS($B8:$B14,"=n-****",D8:D14,"=p")
=COUNTIFS($B8:$B14,"=n-****",D8:D14,"=t")
=COUNTIFS($B8:$B14,"=n-****",D8:D14,"=e")

see attached for more info.
Church-Attendee-List-Plus---EEb.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Saurabh Singh TeotiaCommented:
You can do this by one formula by this..

=SUMPRODUCT((LEFT($B8:$B14,1)="N")*((D8:D14="p")+(D8:D14="t")+(D8:D14="e")))

This will give you the same results about what you are looking for...

Saurabh...
0
barry houdiniCommented:
You could also use this formula to give a combined count

=SUM(COUNTIFS($B8:$B14,"n-*",D8:D14,{"p","t","e"}))

regards, barry

Note: using "****" doesn't do anything different from using a single "*" because the * wildcard denotes any number of characters (even zero) anyway - if you specifically want to count instances which have "n-" followed by four characters you would use ? to denote a single character, e.g. "n-????"
0
Martin LissOlder than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.