Matching and calculating 2 worksheets

M

mayanair

Hi,
I need some help with Excel Functions. I know this does not need much
programming but to just have the right functions to use. I have the
idea just dont know how to compute it. Kindly help

Right so the situation goes like this.

I have one worksheet that has names and IDs. the second worksheet
contains the IDs which is repeated and another column that shows which
ID has a completed case which is stated as COMPLETED.In short an
example as below:

1st Worksheet
ID Name
abc123 John
def345 Angela


2nd Worksheet

ID Status
abc123 Completed
def345 Pending
abc123 Pending
def345 Completed
abc123 Completed

thus the first work sheet will populate as
ID Name Number of completed case
abc123 2
def123 1

How do i compute this?

Appreciate the help
 
B

Biff

Hi!

Assume this is the layout of sheet1:

..................A.................B......................C
1..............ID.............Name............Completed
2..........abc123..........John................formula
3..........def345..........Angela.............formula

Enter this formula in C2:

=SUMPRODUCT(--(Sheet2!A$2:A$6=A2),--(Sheet2!B$2:B$6=C$1))

Copy down as needed.

Biff
 
M

mayanair

Hi.

Thanks for the prompt reply.

I tried the formula, but it doesnt seem to work, resulted in som
circular reference error.

maybe ill just brief again on how the 2 sheets look like

Sheet 1
A.....................B........................C
Name..............ID........................Number of Completed Cases
John...............abc......................
Angela.............def.....................
Nick.................ghi.....................

Sheet 2

A......................B
ID.....................Completed
abc...................Yes
def....................No
abc...................No
ghi....................Yes
def....................Yes
abc....................No
ghi.....................No
def.....................Yes

The formula will match the ID from sheet 1 and sheet 2 and count onl
the number of ID that has a Yes. The end result in sheet one will loo
like below:

A.....................B........................C
Name..............ID........................Number of Completed Cases
John...............abc......................1
Angela.............def.....................2
Nick.................ghi.....................1

Hope this helps.

Thanks again :
 
B

Biff

That doesn't look anything like your first post! <g>

Try this:

=SUMPRODUCT(--(Sheet2!A$2:A$9=B2),--(Sheet2!B$2:B$9="Yes"))

Biff
 
M

mayanair

Hi Biff,

Sorry for the vague desc in the first post

Thanks, it works now but i noticed that the formula is quite static,
does not support if the data increases unless i manually change it. How
to make dynamic?

Thanks.
 

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

Top