+ Reply to Thread
Results 1 to 6 of 6

Matching and calculating 2 worksheets

  1. #1
    Registered User
    Join Date
    04-25-2006
    Posts
    7

    Matching and calculating 2 worksheets

    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

  2. #2
    Biff
    Guest

    Re: Matching and calculating 2 worksheets

    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

    "mayanair" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >
    >
    > --
    > mayanair
    > ------------------------------------------------------------------------
    > mayanair's Profile:
    > http://www.excelforum.com/member.php...o&userid=33847
    > View this thread: http://www.excelforum.com/showthread...hreadid=536267
    >




  3. #3
    Registered User
    Join Date
    04-25-2006
    Posts
    7
    Hi.

    Thanks for the prompt reply.

    I tried the formula, but it doesnt seem to work, resulted in some 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 only the number of ID that has a Yes. The end result in sheet one will look 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

  4. #4
    Biff
    Guest

    Re: Matching and calculating 2 worksheets

    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

    "mayanair" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi.
    >
    > Thanks for the prompt reply.
    >
    > I tried the formula, but it doesnt seem to work, resulted in some
    > 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 only
    > the number of ID that has a Yes. The end result in sheet one will look
    > 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
    >
    >
    > --
    > mayanair
    > ------------------------------------------------------------------------
    > mayanair's Profile:
    > http://www.excelforum.com/member.php...o&userid=33847
    > View this thread: http://www.excelforum.com/showthread...hreadid=536267
    >




  5. #5
    Registered User
    Join Date
    04-25-2006
    Posts
    7
    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.

  6. #6
    Biff
    Guest

    Re: Matching and calculating 2 worksheets

    You can either create a dynamic named range for the data on sheet2:

    http://contextures.com/xlNames01.html#Dynamic

    Or, just use a larger range size that allows for expansion:

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

    Biff

    "mayanair" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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.
    >
    >
    > --
    > mayanair
    > ------------------------------------------------------------------------
    > mayanair's Profile:
    > http://www.excelforum.com/member.php...o&userid=33847
    > View this thread: http://www.excelforum.com/showthread...hreadid=536267
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1