+ Reply to Thread
Results 1 to 51 of 51

SUMPRODUCT using and INDEX function doesn't total

  1. #1
    Registered User
    Join Date
    06-03-2005
    Posts
    4

    Exclamation SUMPRODUCT using and INDEX function doesn't total

    I could use some help determining my problem with a Sumproduct function. I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where I'm getting in trouble.
    I have a separate database or multi-row/multi-column array (pl_Provider) with the first column a listing of items and in the third column of the array I have assigned a value of "Yes" or "No" in the same row for each item.

    I'm having the formula look at a local range "G8:G14" and then do a lookup in the array "pl_Provider" to determine if a Matching record from column G exists and if it does to return the value from column 3, "Yes" or "No". If it is Yes, I want to include the value in column M in the sum.

    =SUMPRODUCT(--(INDEX(pl_Provider, MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))

    The first array in Sumproduct doesn't seem to be giving me an array value, but seems to only evaluate it for only the first value. What don't I understand???

  2. #2
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    I assume that:

    (1) pl_Resources refers to the first column of pl_Provider,
    (2) pl_Provider is set (sorted) in ascending order on pl_provider.

    [A] If G8:G14 is guaranteed not to contain any item that does not also
    exist pl_Resources, then:

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M14)

    [B] If G8:G14 might contain items that do not exist in pl_Resources, then:

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Provider)="Yes")),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)


    rlutes wrote:
    > I could use some help determining my problem with a Sumproduct function.
    > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > I'm getting in trouble.
    > I have a separate database or multi-row/multi-column array
    > (pl_Provider) with the first column a listing of items and in the third
    > column of the array I have assigned a value of "Yes" or "No" in the same
    > row for each item.
    >
    > I'm having the formula look at a local range "G8:G14" and then do a
    > lookup in the array "pl_Provider" to determine if a Matching record
    > from column G exists and if it does to return the value from column 3,
    > "Yes" or "No". If it is Yes, I want to include the value in column M
    > in the sum.
    >
    > =SUMPRODUCT(--(INDEX(pl_Provider,
    > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    >
    > The first array in Sumproduct doesn't seem to be giving me an array
    > value, but seems to only evaluate it for only the first value. What
    > don't I understand???
    >
    >


  3. #3
    Registered User
    Join Date
    06-03-2005
    Posts
    4
    Great, it works! I had spent a couple of hours working on this.

    One change I had to make, was to change my "Yes/No" in the table to "1/0" in order to make it work, but that wasn't a problem to do and actually is a cleaner way. This solution lets me have a flexible table which can be added to without having to reprogram.
    Thanks for the help!

  4. #4
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    The following formula...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    (G8:G14,pl_Provider)="Yes")),M8:M14)

    ....seems to fail when any one of the array of lookup values returns a
    #N/A value. Therefore, wouldn't the following formula be more
    appropriate?

    =SUM(IF(ISNUMBER(MATCH(G8:G14,pl_Resources,0)),(LOOKUP(G8:G14,pl_Provider
    )="Yes")* M8:M14))

    ....confirmed with CONTROL+SHIFT+ENTER.

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > I assume that:
    >
    > (1) pl_Resources refers to the first column of pl_Provider,
    > (2) pl_Provider is set (sorted) in ascending order on pl_provider.
    >
    > [A] If G8:G14 is guaranteed not to contain any item that does not also
    > exist pl_Resources, then:
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M1
    > 4)
    >
    > [B] If G8:G14 might contain items that do not exist in pl_Resources, then:
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Provider)="Yes")),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)
    >
    >
    > rlutes wrote:
    > > I could use some help determining my problem with a Sumproduct function.
    > > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > > I'm getting in trouble.
    > > I have a separate database or multi-row/multi-column array
    > > (pl_Provider) with the first column a listing of items and in the third
    > > column of the array I have assigned a value of "Yes" or "No" in the same
    > > row for each item.
    > >
    > > I'm having the formula look at a local range "G8:G14" and then do a
    > > lookup in the array "pl_Provider" to determine if a Matching record
    > > from column G exists and if it does to return the value from column 3,
    > > "Yes" or "No". If it is Yes, I want to include the value in column M
    > > in the sum.
    > >
    > > =SUMPRODUCT(--(INDEX(pl_Provider,
    > > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    > >
    > > The first array in Sumproduct doesn't seem to be giving me an array
    > > value, but seems to only evaluate it for only the first value. What
    > > don't I understand???
    > >
    > >


  5. #5
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > The following formula...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    > (G8:G14,pl_Provider)="Yes")),M8:M14)
    >
    > ...seems to fail when any one of the array of lookup values returns a
    > #N/A value.


    [...]

    An #N/A cannot go thru the ISNUMBER tests that figure in the formula.

    Here is an example intermediate state of evaluation:

    =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

  6. #6
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >
    > Here is an example intermediate state of evaluation:
    >
    > =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    > Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})


    In theory, the above formula should return 4. The problem is that it
    returns 0 and I get the following error message...

    "Microsoft Excel cannot calculate the formula..."

    I understand that the next stages of the evaluation would be as
    follows...

    =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})

    =SUMPRODUCT({0;0;4;0;0;0})

    So why am I getting an error?

  7. #7
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    >
    >>An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >>
    >>Here is an example intermediate state of evaluation:
    >>
    >>=SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    >>Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

    >
    >
    > In theory, the above formula should return 4. The problem is that it
    > returns 0 and I get the following error message...
    >
    > "Microsoft Excel cannot calculate the formula..."
    >
    > I understand that the next stages of the evaluation would be as
    > follows...
    >
    > =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})
    >
    > =SUMPRODUCT({0;0;4;0;0;0})
    >
    > So why am I getting an error?


    No idea. I myself get 4. Want me to send you the workbook?

  8. #8
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > No idea. I myself get 4. Want me to send you the workbook?


    Yes please. I'd appreciate it.

    Thanks Aladin!

  9. #9
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    When I opened the workbook, the correct result was shown. But when I
    re-entered the formula or clicked in the formula bar and then pressed
    ENTER, I got a 0 along with the same error message.

    So something must be wrong with my version of Excel. Maybe a bug of
    some sort, who knows. I'll have to bring this to Microsoft's attention.

    Aladin, thank you very much for your help! Much appreciated!

    In article <[email protected]>,
    Domenic <[email protected]> wrote:

    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    > > No idea. I myself get 4. Want me to send you the workbook?

    >
    > Yes please. I'd appreciate it.
    >
    > Thanks Aladin!


  10. #10
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    >
    >>An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >>
    >>Here is an example intermediate state of evaluation:
    >>
    >>=SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    >>Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

    >
    >
    > In theory, the above formula should return 4. The problem is that it
    > returns 0 and I get the following error message...
    >
    > "Microsoft Excel cannot calculate the formula..."
    >
    > I understand that the next stages of the evaluation would be as
    > follows...
    >
    > =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})
    >
    > =SUMPRODUCT({0;0;4;0;0;0})
    >
    > So why am I getting an error?


    No idea. I myself get 4. Want me to send you the workbook?

  11. #11
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    When I opened the workbook, the correct result was shown. But when I
    re-entered the formula or clicked in the formula bar and then pressed
    ENTER, I got a 0 along with the same error message.

    So something must be wrong with my version of Excel. Maybe a bug of
    some sort, who knows. I'll have to bring this to Microsoft's attention.

    Aladin, thank you very much for your help! Much appreciated!

    In article <[email protected]>,
    Domenic <[email protected]> wrote:

    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    > > No idea. I myself get 4. Want me to send you the workbook?

    >
    > Yes please. I'd appreciate it.
    >
    > Thanks Aladin!


  12. #12
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > No idea. I myself get 4. Want me to send you the workbook?


    Yes please. I'd appreciate it.

    Thanks Aladin!

  13. #13
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >
    > Here is an example intermediate state of evaluation:
    >
    > =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    > Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})


    In theory, the above formula should return 4. The problem is that it
    returns 0 and I get the following error message...

    "Microsoft Excel cannot calculate the formula..."

    I understand that the next stages of the evaluation would be as
    follows...

    =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})

    =SUMPRODUCT({0;0;4;0;0;0})

    So why am I getting an error?

  14. #14
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > The following formula...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    > (G8:G14,pl_Provider)="Yes")),M8:M14)
    >
    > ...seems to fail when any one of the array of lookup values returns a
    > #N/A value.


    [...]

    An #N/A cannot go thru the ISNUMBER tests that figure in the formula.

    Here is an example intermediate state of evaluation:

    =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

  15. #15
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    The following formula...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    (G8:G14,pl_Provider)="Yes")),M8:M14)

    ....seems to fail when any one of the array of lookup values returns a
    #N/A value. Therefore, wouldn't the following formula be more
    appropriate?

    =SUM(IF(ISNUMBER(MATCH(G8:G14,pl_Resources,0)),(LOOKUP(G8:G14,pl_Provider
    )="Yes")* M8:M14))

    ....confirmed with CONTROL+SHIFT+ENTER.

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > I assume that:
    >
    > (1) pl_Resources refers to the first column of pl_Provider,
    > (2) pl_Provider is set (sorted) in ascending order on pl_provider.
    >
    > [A] If G8:G14 is guaranteed not to contain any item that does not also
    > exist pl_Resources, then:
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M1
    > 4)
    >
    > [B] If G8:G14 might contain items that do not exist in pl_Resources, then:
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Provider)="Yes")),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)
    >
    >
    > rlutes wrote:
    > > I could use some help determining my problem with a Sumproduct function.
    > > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > > I'm getting in trouble.
    > > I have a separate database or multi-row/multi-column array
    > > (pl_Provider) with the first column a listing of items and in the third
    > > column of the array I have assigned a value of "Yes" or "No" in the same
    > > row for each item.
    > >
    > > I'm having the formula look at a local range "G8:G14" and then do a
    > > lookup in the array "pl_Provider" to determine if a Matching record
    > > from column G exists and if it does to return the value from column 3,
    > > "Yes" or "No". If it is Yes, I want to include the value in column M
    > > in the sum.
    > >
    > > =SUMPRODUCT(--(INDEX(pl_Provider,
    > > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    > >
    > > The first array in Sumproduct doesn't seem to be giving me an array
    > > value, but seems to only evaluate it for only the first value. What
    > > don't I understand???
    > >
    > >


  16. #16
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    I assume that:

    (1) pl_Resources refers to the first column of pl_Provider,
    (2) pl_Provider is set (sorted) in ascending order on pl_provider.

    [A] If G8:G14 is guaranteed not to contain any item that does not also
    exist pl_Resources, then:

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M14)

    [B] If G8:G14 might contain items that do not exist in pl_Resources, then:

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Provider)="Yes")),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)


    rlutes wrote:
    > I could use some help determining my problem with a Sumproduct function.
    > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > I'm getting in trouble.
    > I have a separate database or multi-row/multi-column array
    > (pl_Provider) with the first column a listing of items and in the third
    > column of the array I have assigned a value of "Yes" or "No" in the same
    > row for each item.
    >
    > I'm having the formula look at a local range "G8:G14" and then do a
    > lookup in the array "pl_Provider" to determine if a Matching record
    > from column G exists and if it does to return the value from column 3,
    > "Yes" or "No". If it is Yes, I want to include the value in column M
    > in the sum.
    >
    > =SUMPRODUCT(--(INDEX(pl_Provider,
    > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    >
    > The first array in Sumproduct doesn't seem to be giving me an array
    > value, but seems to only evaluate it for only the first value. What
    > don't I understand???
    >
    >


  17. #17
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    I assume that:

    (1) pl_Resources refers to the first column of pl_Provider,
    (2) pl_Provider is set (sorted) in ascending order on pl_provider.

    [A] If G8:G14 is guaranteed not to contain any item that does not also
    exist pl_Resources, then:

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M14)

    [B] If G8:G14 might contain items that do not exist in pl_Resources, then:

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Provider)="Yes")),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)


    rlutes wrote:
    > I could use some help determining my problem with a Sumproduct function.
    > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > I'm getting in trouble.
    > I have a separate database or multi-row/multi-column array
    > (pl_Provider) with the first column a listing of items and in the third
    > column of the array I have assigned a value of "Yes" or "No" in the same
    > row for each item.
    >
    > I'm having the formula look at a local range "G8:G14" and then do a
    > lookup in the array "pl_Provider" to determine if a Matching record
    > from column G exists and if it does to return the value from column 3,
    > "Yes" or "No". If it is Yes, I want to include the value in column M
    > in the sum.
    >
    > =SUMPRODUCT(--(INDEX(pl_Provider,
    > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    >
    > The first array in Sumproduct doesn't seem to be giving me an array
    > value, but seems to only evaluate it for only the first value. What
    > don't I understand???
    >
    >


  18. #18
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    The following formula...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    (G8:G14,pl_Provider)="Yes")),M8:M14)

    ....seems to fail when any one of the array of lookup values returns a
    #N/A value. Therefore, wouldn't the following formula be more
    appropriate?

    =SUM(IF(ISNUMBER(MATCH(G8:G14,pl_Resources,0)),(LOOKUP(G8:G14,pl_Provider
    )="Yes")* M8:M14))

    ....confirmed with CONTROL+SHIFT+ENTER.

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > I assume that:
    >
    > (1) pl_Resources refers to the first column of pl_Provider,
    > (2) pl_Provider is set (sorted) in ascending order on pl_provider.
    >
    > [A] If G8:G14 is guaranteed not to contain any item that does not also
    > exist pl_Resources, then:
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M1
    > 4)
    >
    > [B] If G8:G14 might contain items that do not exist in pl_Resources, then:
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Provider)="Yes")),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)
    >
    >
    > rlutes wrote:
    > > I could use some help determining my problem with a Sumproduct function.
    > > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > > I'm getting in trouble.
    > > I have a separate database or multi-row/multi-column array
    > > (pl_Provider) with the first column a listing of items and in the third
    > > column of the array I have assigned a value of "Yes" or "No" in the same
    > > row for each item.
    > >
    > > I'm having the formula look at a local range "G8:G14" and then do a
    > > lookup in the array "pl_Provider" to determine if a Matching record
    > > from column G exists and if it does to return the value from column 3,
    > > "Yes" or "No". If it is Yes, I want to include the value in column M
    > > in the sum.
    > >
    > > =SUMPRODUCT(--(INDEX(pl_Provider,
    > > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    > >
    > > The first array in Sumproduct doesn't seem to be giving me an array
    > > value, but seems to only evaluate it for only the first value. What
    > > don't I understand???
    > >
    > >


  19. #19
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > The following formula...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    > (G8:G14,pl_Provider)="Yes")),M8:M14)
    >
    > ...seems to fail when any one of the array of lookup values returns a
    > #N/A value.


    [...]

    An #N/A cannot go thru the ISNUMBER tests that figure in the formula.

    Here is an example intermediate state of evaluation:

    =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

  20. #20
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >
    > Here is an example intermediate state of evaluation:
    >
    > =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    > Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})


    In theory, the above formula should return 4. The problem is that it
    returns 0 and I get the following error message...

    "Microsoft Excel cannot calculate the formula..."

    I understand that the next stages of the evaluation would be as
    follows...

    =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})

    =SUMPRODUCT({0;0;4;0;0;0})

    So why am I getting an error?

  21. #21
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    >
    >>An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >>
    >>Here is an example intermediate state of evaluation:
    >>
    >>=SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    >>Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

    >
    >
    > In theory, the above formula should return 4. The problem is that it
    > returns 0 and I get the following error message...
    >
    > "Microsoft Excel cannot calculate the formula..."
    >
    > I understand that the next stages of the evaluation would be as
    > follows...
    >
    > =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})
    >
    > =SUMPRODUCT({0;0;4;0;0;0})
    >
    > So why am I getting an error?


    No idea. I myself get 4. Want me to send you the workbook?

  22. #22
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > No idea. I myself get 4. Want me to send you the workbook?


    Yes please. I'd appreciate it.

    Thanks Aladin!

  23. #23
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    When I opened the workbook, the correct result was shown. But when I
    re-entered the formula or clicked in the formula bar and then pressed
    ENTER, I got a 0 along with the same error message.

    So something must be wrong with my version of Excel. Maybe a bug of
    some sort, who knows. I'll have to bring this to Microsoft's attention.

    Aladin, thank you very much for your help! Much appreciated!

    In article <[email protected]>,
    Domenic <[email protected]> wrote:

    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    > > No idea. I myself get 4. Want me to send you the workbook?

    >
    > Yes please. I'd appreciate it.
    >
    > Thanks Aladin!


  24. #24
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > The following formula...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    > (G8:G14,pl_Provider)="Yes")),M8:M14)
    >
    > ...seems to fail when any one of the array of lookup values returns a
    > #N/A value.


    [...]

    An #N/A cannot go thru the ISNUMBER tests that figure in the formula.

    Here is an example intermediate state of evaluation:

    =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

  25. #25
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    When I opened the workbook, the correct result was shown. But when I
    re-entered the formula or clicked in the formula bar and then pressed
    ENTER, I got a 0 along with the same error message.

    So something must be wrong with my version of Excel. Maybe a bug of
    some sort, who knows. I'll have to bring this to Microsoft's attention.

    Aladin, thank you very much for your help! Much appreciated!

    In article <[email protected]>,
    Domenic <[email protected]> wrote:

    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    > > No idea. I myself get 4. Want me to send you the workbook?

    >
    > Yes please. I'd appreciate it.
    >
    > Thanks Aladin!


  26. #26
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > No idea. I myself get 4. Want me to send you the workbook?


    Yes please. I'd appreciate it.

    Thanks Aladin!

  27. #27
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    >
    >>An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >>
    >>Here is an example intermediate state of evaluation:
    >>
    >>=SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    >>Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

    >
    >
    > In theory, the above formula should return 4. The problem is that it
    > returns 0 and I get the following error message...
    >
    > "Microsoft Excel cannot calculate the formula..."
    >
    > I understand that the next stages of the evaluation would be as
    > follows...
    >
    > =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})
    >
    > =SUMPRODUCT({0;0;4;0;0;0})
    >
    > So why am I getting an error?


    No idea. I myself get 4. Want me to send you the workbook?

  28. #28
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    The following formula...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    (G8:G14,pl_Provider)="Yes")),M8:M14)

    ....seems to fail when any one of the array of lookup values returns a
    #N/A value. Therefore, wouldn't the following formula be more
    appropriate?

    =SUM(IF(ISNUMBER(MATCH(G8:G14,pl_Resources,0)),(LOOKUP(G8:G14,pl_Provider
    )="Yes")* M8:M14))

    ....confirmed with CONTROL+SHIFT+ENTER.

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > I assume that:
    >
    > (1) pl_Resources refers to the first column of pl_Provider,
    > (2) pl_Provider is set (sorted) in ascending order on pl_provider.
    >
    > [A] If G8:G14 is guaranteed not to contain any item that does not also
    > exist pl_Resources, then:
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M1
    > 4)
    >
    > [B] If G8:G14 might contain items that do not exist in pl_Resources, then:
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Provider)="Yes")),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)
    >
    >
    > rlutes wrote:
    > > I could use some help determining my problem with a Sumproduct function.
    > > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > > I'm getting in trouble.
    > > I have a separate database or multi-row/multi-column array
    > > (pl_Provider) with the first column a listing of items and in the third
    > > column of the array I have assigned a value of "Yes" or "No" in the same
    > > row for each item.
    > >
    > > I'm having the formula look at a local range "G8:G14" and then do a
    > > lookup in the array "pl_Provider" to determine if a Matching record
    > > from column G exists and if it does to return the value from column 3,
    > > "Yes" or "No". If it is Yes, I want to include the value in column M
    > > in the sum.
    > >
    > > =SUMPRODUCT(--(INDEX(pl_Provider,
    > > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    > >
    > > The first array in Sumproduct doesn't seem to be giving me an array
    > > value, but seems to only evaluate it for only the first value. What
    > > don't I understand???
    > >
    > >


  29. #29
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    I assume that:

    (1) pl_Resources refers to the first column of pl_Provider,
    (2) pl_Provider is set (sorted) in ascending order on pl_provider.

    [A] If G8:G14 is guaranteed not to contain any item that does not also
    exist pl_Resources, then:

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M14)

    [B] If G8:G14 might contain items that do not exist in pl_Resources, then:

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Provider)="Yes")),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)


    rlutes wrote:
    > I could use some help determining my problem with a Sumproduct function.
    > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > I'm getting in trouble.
    > I have a separate database or multi-row/multi-column array
    > (pl_Provider) with the first column a listing of items and in the third
    > column of the array I have assigned a value of "Yes" or "No" in the same
    > row for each item.
    >
    > I'm having the formula look at a local range "G8:G14" and then do a
    > lookup in the array "pl_Provider" to determine if a Matching record
    > from column G exists and if it does to return the value from column 3,
    > "Yes" or "No". If it is Yes, I want to include the value in column M
    > in the sum.
    >
    > =SUMPRODUCT(--(INDEX(pl_Provider,
    > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    >
    > The first array in Sumproduct doesn't seem to be giving me an array
    > value, but seems to only evaluate it for only the first value. What
    > don't I understand???
    >
    >


  30. #30
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >
    > Here is an example intermediate state of evaluation:
    >
    > =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    > Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})


    In theory, the above formula should return 4. The problem is that it
    returns 0 and I get the following error message...

    "Microsoft Excel cannot calculate the formula..."

    I understand that the next stages of the evaluation would be as
    follows...

    =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})

    =SUMPRODUCT({0;0;4;0;0;0})

    So why am I getting an error?

  31. #31
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    I assume that:

    (1) pl_Resources refers to the first column of pl_Provider,
    (2) pl_Provider is set (sorted) in ascending order on pl_provider.

    [A] If G8:G14 is guaranteed not to contain any item that does not also
    exist pl_Resources, then:

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M14)

    [B] If G8:G14 might contain items that do not exist in pl_Resources, then:

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Provider)="Yes")),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)


    rlutes wrote:
    > I could use some help determining my problem with a Sumproduct function.
    > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > I'm getting in trouble.
    > I have a separate database or multi-row/multi-column array
    > (pl_Provider) with the first column a listing of items and in the third
    > column of the array I have assigned a value of "Yes" or "No" in the same
    > row for each item.
    >
    > I'm having the formula look at a local range "G8:G14" and then do a
    > lookup in the array "pl_Provider" to determine if a Matching record
    > from column G exists and if it does to return the value from column 3,
    > "Yes" or "No". If it is Yes, I want to include the value in column M
    > in the sum.
    >
    > =SUMPRODUCT(--(INDEX(pl_Provider,
    > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    >
    > The first array in Sumproduct doesn't seem to be giving me an array
    > value, but seems to only evaluate it for only the first value. What
    > don't I understand???
    >
    >


  32. #32
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    The following formula...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    (G8:G14,pl_Provider)="Yes")),M8:M14)

    ....seems to fail when any one of the array of lookup values returns a
    #N/A value. Therefore, wouldn't the following formula be more
    appropriate?

    =SUM(IF(ISNUMBER(MATCH(G8:G14,pl_Resources,0)),(LOOKUP(G8:G14,pl_Provider
    )="Yes")* M8:M14))

    ....confirmed with CONTROL+SHIFT+ENTER.

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > I assume that:
    >
    > (1) pl_Resources refers to the first column of pl_Provider,
    > (2) pl_Provider is set (sorted) in ascending order on pl_provider.
    >
    > [A] If G8:G14 is guaranteed not to contain any item that does not also
    > exist pl_Resources, then:
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M1
    > 4)
    >
    > [B] If G8:G14 might contain items that do not exist in pl_Resources, then:
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Provider)="Yes")),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)
    >
    >
    > rlutes wrote:
    > > I could use some help determining my problem with a Sumproduct function.
    > > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > > I'm getting in trouble.
    > > I have a separate database or multi-row/multi-column array
    > > (pl_Provider) with the first column a listing of items and in the third
    > > column of the array I have assigned a value of "Yes" or "No" in the same
    > > row for each item.
    > >
    > > I'm having the formula look at a local range "G8:G14" and then do a
    > > lookup in the array "pl_Provider" to determine if a Matching record
    > > from column G exists and if it does to return the value from column 3,
    > > "Yes" or "No". If it is Yes, I want to include the value in column M
    > > in the sum.
    > >
    > > =SUMPRODUCT(--(INDEX(pl_Provider,
    > > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    > >
    > > The first array in Sumproduct doesn't seem to be giving me an array
    > > value, but seems to only evaluate it for only the first value. What
    > > don't I understand???
    > >
    > >


  33. #33
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > The following formula...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    > (G8:G14,pl_Provider)="Yes")),M8:M14)
    >
    > ...seems to fail when any one of the array of lookup values returns a
    > #N/A value.


    [...]

    An #N/A cannot go thru the ISNUMBER tests that figure in the formula.

    Here is an example intermediate state of evaluation:

    =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

  34. #34
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >
    > Here is an example intermediate state of evaluation:
    >
    > =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    > Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})


    In theory, the above formula should return 4. The problem is that it
    returns 0 and I get the following error message...

    "Microsoft Excel cannot calculate the formula..."

    I understand that the next stages of the evaluation would be as
    follows...

    =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})

    =SUMPRODUCT({0;0;4;0;0;0})

    So why am I getting an error?

  35. #35
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    >
    >>An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >>
    >>Here is an example intermediate state of evaluation:
    >>
    >>=SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    >>Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

    >
    >
    > In theory, the above formula should return 4. The problem is that it
    > returns 0 and I get the following error message...
    >
    > "Microsoft Excel cannot calculate the formula..."
    >
    > I understand that the next stages of the evaluation would be as
    > follows...
    >
    > =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})
    >
    > =SUMPRODUCT({0;0;4;0;0;0})
    >
    > So why am I getting an error?


    No idea. I myself get 4. Want me to send you the workbook?

  36. #36
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > No idea. I myself get 4. Want me to send you the workbook?


    Yes please. I'd appreciate it.

    Thanks Aladin!

  37. #37
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    When I opened the workbook, the correct result was shown. But when I
    re-entered the formula or clicked in the formula bar and then pressed
    ENTER, I got a 0 along with the same error message.

    So something must be wrong with my version of Excel. Maybe a bug of
    some sort, who knows. I'll have to bring this to Microsoft's attention.

    Aladin, thank you very much for your help! Much appreciated!

    In article <[email protected]>,
    Domenic <[email protected]> wrote:

    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    > > No idea. I myself get 4. Want me to send you the workbook?

    >
    > Yes please. I'd appreciate it.
    >
    > Thanks Aladin!


  38. #38
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > The following formula...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    > (G8:G14,pl_Provider)="Yes")),M8:M14)
    >
    > ...seems to fail when any one of the array of lookup values returns a
    > #N/A value.


    [...]

    An #N/A cannot go thru the ISNUMBER tests that figure in the formula.

    Here is an example intermediate state of evaluation:

    =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

  39. #39
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    When I opened the workbook, the correct result was shown. But when I
    re-entered the formula or clicked in the formula bar and then pressed
    ENTER, I got a 0 along with the same error message.

    So something must be wrong with my version of Excel. Maybe a bug of
    some sort, who knows. I'll have to bring this to Microsoft's attention.

    Aladin, thank you very much for your help! Much appreciated!

    In article <[email protected]>,
    Domenic <[email protected]> wrote:

    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    > > No idea. I myself get 4. Want me to send you the workbook?

    >
    > Yes please. I'd appreciate it.
    >
    > Thanks Aladin!


  40. #40
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > No idea. I myself get 4. Want me to send you the workbook?


    Yes please. I'd appreciate it.

    Thanks Aladin!

  41. #41
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    >
    >>An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >>
    >>Here is an example intermediate state of evaluation:
    >>
    >>=SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    >>Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

    >
    >
    > In theory, the above formula should return 4. The problem is that it
    > returns 0 and I get the following error message...
    >
    > "Microsoft Excel cannot calculate the formula..."
    >
    > I understand that the next stages of the evaluation would be as
    > follows...
    >
    > =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})
    >
    > =SUMPRODUCT({0;0;4;0;0;0})
    >
    > So why am I getting an error?


    No idea. I myself get 4. Want me to send you the workbook?

  42. #42
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >
    > Here is an example intermediate state of evaluation:
    >
    > =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    > Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})


    In theory, the above formula should return 4. The problem is that it
    returns 0 and I get the following error message...

    "Microsoft Excel cannot calculate the formula..."

    I understand that the next stages of the evaluation would be as
    follows...

    =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})

    =SUMPRODUCT({0;0;4;0;0;0})

    So why am I getting an error?

  43. #43
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    The following formula...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    (G8:G14,pl_Provider)="Yes")),M8:M14)

    ....seems to fail when any one of the array of lookup values returns a
    #N/A value. Therefore, wouldn't the following formula be more
    appropriate?

    =SUM(IF(ISNUMBER(MATCH(G8:G14,pl_Resources,0)),(LOOKUP(G8:G14,pl_Provider
    )="Yes")* M8:M14))

    ....confirmed with CONTROL+SHIFT+ENTER.

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > I assume that:
    >
    > (1) pl_Resources refers to the first column of pl_Provider,
    > (2) pl_Provider is set (sorted) in ascending order on pl_provider.
    >
    > [A] If G8:G14 is guaranteed not to contain any item that does not also
    > exist pl_Resources, then:
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M1
    > 4)
    >
    > [B] If G8:G14 might contain items that do not exist in pl_Resources, then:
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Provider)="Yes")),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)
    >
    >
    > rlutes wrote:
    > > I could use some help determining my problem with a Sumproduct function.
    > > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > > I'm getting in trouble.
    > > I have a separate database or multi-row/multi-column array
    > > (pl_Provider) with the first column a listing of items and in the third
    > > column of the array I have assigned a value of "Yes" or "No" in the same
    > > row for each item.
    > >
    > > I'm having the formula look at a local range "G8:G14" and then do a
    > > lookup in the array "pl_Provider" to determine if a Matching record
    > > from column G exists and if it does to return the value from column 3,
    > > "Yes" or "No". If it is Yes, I want to include the value in column M
    > > in the sum.
    > >
    > > =SUMPRODUCT(--(INDEX(pl_Provider,
    > > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    > >
    > > The first array in Sumproduct doesn't seem to be giving me an array
    > > value, but seems to only evaluate it for only the first value. What
    > > don't I understand???
    > >
    > >


  44. #44
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    I assume that:

    (1) pl_Resources refers to the first column of pl_Provider,
    (2) pl_Provider is set (sorted) in ascending order on pl_provider.

    [A] If G8:G14 is guaranteed not to contain any item that does not also
    exist pl_Resources, then:

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M14)

    [B] If G8:G14 might contain items that do not exist in pl_Resources, then:

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Provider)="Yes")),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)


    rlutes wrote:
    > I could use some help determining my problem with a Sumproduct function.
    > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > I'm getting in trouble.
    > I have a separate database or multi-row/multi-column array
    > (pl_Provider) with the first column a listing of items and in the third
    > column of the array I have assigned a value of "Yes" or "No" in the same
    > row for each item.
    >
    > I'm having the formula look at a local range "G8:G14" and then do a
    > lookup in the array "pl_Provider" to determine if a Matching record
    > from column G exists and if it does to return the value from column 3,
    > "Yes" or "No". If it is Yes, I want to include the value in column M
    > in the sum.
    >
    > =SUMPRODUCT(--(INDEX(pl_Provider,
    > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    >
    > The first array in Sumproduct doesn't seem to be giving me an array
    > value, but seems to only evaluate it for only the first value. What
    > don't I understand???
    >
    >


  45. #45
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    I assume that:

    (1) pl_Resources refers to the first column of pl_Provider,
    (2) pl_Provider is set (sorted) in ascending order on pl_provider.

    [A] If G8:G14 is guaranteed not to contain any item that does not also
    exist pl_Resources, then:

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M14)

    [B] If G8:G14 might contain items that do not exist in pl_Resources, then:

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Provider)="Yes")),M8:M14)

    If Yes/No values are not in the last column of pl_Provider...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)


    rlutes wrote:
    > I could use some help determining my problem with a Sumproduct function.
    > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > I'm getting in trouble.
    > I have a separate database or multi-row/multi-column array
    > (pl_Provider) with the first column a listing of items and in the third
    > column of the array I have assigned a value of "Yes" or "No" in the same
    > row for each item.
    >
    > I'm having the formula look at a local range "G8:G14" and then do a
    > lookup in the array "pl_Provider" to determine if a Matching record
    > from column G exists and if it does to return the value from column 3,
    > "Yes" or "No". If it is Yes, I want to include the value in column M
    > in the sum.
    >
    > =SUMPRODUCT(--(INDEX(pl_Provider,
    > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    >
    > The first array in Sumproduct doesn't seem to be giving me an array
    > value, but seems to only evaluate it for only the first value. What
    > don't I understand???
    >
    >


  46. #46
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    The following formula...

    =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    (G8:G14,pl_Provider)="Yes")),M8:M14)

    ....seems to fail when any one of the array of lookup values returns a
    #N/A value. Therefore, wouldn't the following formula be more
    appropriate?

    =SUM(IF(ISNUMBER(MATCH(G8:G14,pl_Resources,0)),(LOOKUP(G8:G14,pl_Provider
    )="Yes")* M8:M14))

    ....confirmed with CONTROL+SHIFT+ENTER.

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > I assume that:
    >
    > (1) pl_Resources refers to the first column of pl_Provider,
    > (2) pl_Provider is set (sorted) in ascending order on pl_provider.
    >
    > [A] If G8:G14 is guaranteed not to contain any item that does not also
    > exist pl_Resources, then:
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Provider)="Yes"),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--(LOOKUP(G8:G14,pl_Resources,INDEX(pl_Provider,0,3))="Yes"),M8:M1
    > 4)
    >
    > [B] If G8:G14 might contain items that do not exist in pl_Resources, then:
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Provider)="Yes")),M8:M14)
    >
    > If Yes/No values are not in the last column of pl_Provider...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP(G8:G
    > 14,pl_Resources,INDEX(pl_Provider,0,3)),M8:M14)
    >
    >
    > rlutes wrote:
    > > I could use some help determining my problem with a Sumproduct function.
    > > I'm wanting to sum a list "M8:M14" if a criteria is met. Here's where
    > > I'm getting in trouble.
    > > I have a separate database or multi-row/multi-column array
    > > (pl_Provider) with the first column a listing of items and in the third
    > > column of the array I have assigned a value of "Yes" or "No" in the same
    > > row for each item.
    > >
    > > I'm having the formula look at a local range "G8:G14" and then do a
    > > lookup in the array "pl_Provider" to determine if a Matching record
    > > from column G exists and if it does to return the value from column 3,
    > > "Yes" or "No". If it is Yes, I want to include the value in column M
    > > in the sum.
    > >
    > > =SUMPRODUCT(--(INDEX(pl_Provider,
    > > MATCH(G8:G14,pl_Resources,0),3)="Yes"),(M8:M14))
    > >
    > > The first array in Sumproduct doesn't seem to be giving me an array
    > > value, but seems to only evaluate it for only the first value. What
    > > don't I understand???
    > >
    > >


  47. #47
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > The following formula...
    >
    > =SUMPRODUCT(--ISNUMBER(MATCH(G8:G14,pl_Resources,0)),--ISNUMBER(1/(LOOKUP
    > (G8:G14,pl_Provider)="Yes")),M8:M14)
    >
    > ...seems to fail when any one of the array of lookup values returns a
    > #N/A value.


    [...]

    An #N/A cannot go thru the ISNUMBER tests that figure in the formula.

    Here is an example intermediate state of evaluation:

    =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

  48. #48
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >
    > Here is an example intermediate state of evaluation:
    >
    > =SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    > Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})


    In theory, the above formula should return 4. The problem is that it
    returns 0 and I get the following error message...

    "Microsoft Excel cannot calculate the formula..."

    I understand that the next stages of the evaluation would be as
    follows...

    =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})

    =SUMPRODUCT({0;0;4;0;0;0})

    So why am I getting an error?

  49. #49
    Aladin Akyurek
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    Domenic wrote:
    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    >
    >>An #N/A cannot go thru the ISNUMBER tests that figure in the formula.
    >>
    >>Here is an example intermediate state of evaluation:
    >>
    >>=SUMPRODUCT(--ISNUMBER({#N/A;2;6;#N/A;3;#N/A;#N/A}),--ISNUMBER(1/({#N/A;"No";"
    >>Yes";#N/A;"No";#N/A;"No"}="Yes")),{5;6;4;7;8;9;6})

    >
    >
    > In theory, the above formula should return 4. The problem is that it
    > returns 0 and I get the following error message...
    >
    > "Microsoft Excel cannot calculate the formula..."
    >
    > I understand that the next stages of the evaluation would be as
    > follows...
    >
    > =SUMPRODUCT({0;1;1;0;1;0},{0;0;1;0;0;0},{5;6;4;7;8;9})
    >
    > =SUMPRODUCT({0;0;4;0;0;0})
    >
    > So why am I getting an error?


    No idea. I myself get 4. Want me to send you the workbook?

  50. #50
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > No idea. I myself get 4. Want me to send you the workbook?


    Yes please. I'd appreciate it.

    Thanks Aladin!

  51. #51
    Domenic
    Guest

    Re: SUMPRODUCT using and INDEX function doesn't total

    When I opened the workbook, the correct result was shown. But when I
    re-entered the formula or clicked in the formula bar and then pressed
    ENTER, I got a 0 along with the same error message.

    So something must be wrong with my version of Excel. Maybe a bug of
    some sort, who knows. I'll have to bring this to Microsoft's attention.

    Aladin, thank you very much for your help! Much appreciated!

    In article <[email protected]>,
    Domenic <[email protected]> wrote:

    > In article <[email protected]>,
    > Aladin Akyurek <[email protected]> wrote:
    >
    > > No idea. I myself get 4. Want me to send you the workbook?

    >
    > Yes please. I'd appreciate it.
    >
    > Thanks Aladin!


+ 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