Group:  Microsoft Excel ยป microsoft.public.excel.newusers
Thread: Countif with 2 Conditions

Geek News

Countif with 2 Conditions
cmsinsides 12/23/2008 6:46:00 AM
I want to use Countif with 2 conditions. For example,
1. It searches for the Emp Name, I need - Emp Name column A
2. It checks whether the Emp is Absent / present - Emp Attendance column B
then counts the no. of appearances of this Emp name in Column A

The absentee can be manually deleted & then countif is to be applied but I
want a function to do this without deleting
Re: Countif with 2 Conditions
Max 12/23/2008 10:20:06 AM
Something like this, in say C2:
=sumproduct((A$2:A$100="Name1")*(B$2:B$100="Present"))
will return the required count of employee "Name1"'s attendance record - ie
where s/he was marked as "Present" in col B. Adapt the ranges to suit.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"cmsinsides" wrote:
[Quoted Text]
> I want to use Countif with 2 conditions. For example,
> 1. It searches for the Emp Name, I need - Emp Name column A
> 2. It checks whether the Emp is Absent / present - Emp Attendance column B
> then counts the no. of appearances of this Emp name in Column A
>
> The absentee can be manually deleted & then countif is to be applied but I
> want a function to do this without deleting
Re: Countif with 2 Conditions
Satyendra_Haldaur 12/29/2008 2:40:01 PM

sorry max but that is a different situation . in this situation my data has
only one column and i have to apply multiple condition.
"Max" wrote:

[Quoted Text]
> Something like this, in say C2:
> =sumproduct((A$2:A$100="Name1")*(B$2:B$100="Present"))
> will return the required count of employee "Name1"'s attendance record - ie
> where s/he was marked as "Present" in col B. Adapt the ranges to suit.
> --
> Max
> Singapore
> http://savefile.com/projects/236895
> Downloads:21,000 Files:370 Subscribers:66
> xdemechanik
> ---
> "cmsinsides" wrote:
> > I want to use Countif with 2 conditions. For example,
> > 1. It searches for the Emp Name, I need - Emp Name column A
> > 2. It checks whether the Emp is Absent / present - Emp Attendance column B
> > then counts the no. of appearances of this Emp name in Column A
> >
> > The absentee can be manually deleted & then countif is to be applied but I
> > want a function to do this without deleting
Re: Countif with 2 Conditions
JBeaucaire <JBeaucaire.3l6qe9[ at ]thecodecage.com> 12/29/2008 2:52:55 PM
post up a clear sampling of your data and what/where you want countif formulas operating. Much faster than back and forth like this... -- JBeaucaire ------------------------------------------------------------------------ JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73 View this thread: http://www.thecodecage.com/forumz/showthread.php?t=43626
Re: Countif with 2 Conditions
Max 12/30/2008 6:30:03 AM
[Quoted Text]
> .. my data has only one column and i have to apply multiple condition.

Maybe you meant something like this:
=SUMPRODUCT((COUNTIF(A2:A10,{"kk","gg","aa"})))
which counts the total occurrences of: kk, gg, aa
within the range A2:A10
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
Re: Countif with 2 Conditions
Max 12/30/2008 7:35:01 AM
Think SUM can be used here (shorter):
=SUM((COUNTIF(A2:A10,{"kk","gg","aa"})))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net