+ Reply to Thread
Results 1 to 14 of 14

don't have a good thread title. (sumproduct?)

  1. #1
    Registered User
    Join Date
    03-17-2006
    MS-Off Ver
    2007
    Posts
    93

    don't have a good thread title. (sumproduct?)

    trying to use this formula:

    SUMPRODUCT(($L$22:$L$1166={"1svc"})*($M$22:$M$1166))

    Column L contains both text and numerical data. Using excel help, near as I can tell it cannot read the column with both types being contained within.


    here is as far as I can get with "help":

    Microsoft Excel cannot translate the text into the correct data type. Make sure the formula or function is correct for the required operand or argument, and that the cells that are referenced by the formula contain valid values. For example, if cell A5 contains a number and cell A6 contains the text "Not available", the formula =A5+A6 will return the error #VALUE!.



    ???
    Better to be roughly right than exactly wrong, unless you are using Excel.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,787
    It looks like a viable formula to me - what result do you get?

    The curly braces are superfluous here and I'd advise a different syntax

    =SUMPRODUCT(--($L$22:$L$1166="1svc"),$M$22:$M$1166)

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,787
    Sorry, it is Saturday so I'm a bit slow today, but you really only need SUMIF for one criterion, i.e.

    =SUMIF($L$22:$L$1166,"1svc",$M$22:$M$1166)

  4. #4
    Registered User
    Join Date
    03-17-2006
    MS-Off Ver
    2007
    Posts
    93
    gives me #value

    I'll try yours in a bit and see what happens.

    One thing forgot, the "1svc" is just one of many variables I will be looking for (it was just my test) - how to string those in?
    Last edited by redneck joe; 04-22-2006 at 12:10 PM.

  5. #5
    Registered User
    Join Date
    03-17-2006
    MS-Off Ver
    2007
    Posts
    93
    thanks - both worked. Why do you prefer one over the other??

  6. #6
    Bob Phillips
    Guest

    Re: don't have a good thread title. (sumproduct?)

    SUMIF is more efficient if there is only one condition to test for.

    If you still need multiple values, use

    =SUMPRODUCT(--(ISNUMBER(MATCH($L$22:$L$1166,{"1svc","2cdr"},0))),--$M$22:$M$
    1166)

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "redneck joe" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > thanks - both worked. Why do you prefer one over the other??
    >
    >
    > --
    > redneck joe
    >
    >
    > ------------------------------------------------------------------------
    > redneck joe's Profile:

    http://www.excelforum.com/member.php...o&userid=32570
    > View this thread: http://www.excelforum.com/showthread...hreadid=535222
    >




  7. #7
    Registered User
    Join Date
    03-17-2006
    MS-Off Ver
    2007
    Posts
    93
    thanks Bob, but i'm back to the #value! error.

    ????

  8. #8
    Bob Phillips
    Guest

    Re: don't have a good thread title. (sumproduct?)

    That suggests to me a text value in the M column alongside one of the
    conditions tested for.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "redneck joe" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > thanks Bob, but i'm back to the #value! error.
    >
    > ????
    >
    >
    > --
    > redneck joe
    >
    >
    > ------------------------------------------------------------------------
    > redneck joe's Profile:

    http://www.excelforum.com/member.php...o&userid=32570
    > View this thread: http://www.excelforum.com/showthread...hreadid=535222
    >




  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,787
    You could still use SUMIF....

    =SUM(SUMIF($L$22:$L$1166,{"1svc","xyz"},$M$22:$M$1166))

  10. #10
    Registered User
    Join Date
    03-17-2006
    MS-Off Ver
    2007
    Posts
    93
    And we have a winner....

    thank a million for the help.

    j







    Quote Originally Posted by daddylonglegs
    You could still use SUMIF....

    =SUM(SUMIF($L$22:$L$1166,{"1svc","xyz"},$M$22:$M$1166))

  11. #11
    Bob Phillips
    Guest

    Re: don't have a good thread title. (sumproduct?)

    Which means that you have text in a number field as I suggested. If you want
    to ignore bad data, so be it.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "redneck joe" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > And we have a winner....
    >
    > thank a million for the help.
    >
    > j
    >
    >
    >
    >
    >
    >
    >
    > daddylonglegs Wrote:
    > > You could still use SUMIF....
    > >
    > > =SUM(SUMIF($L$22:$L$1166,{"1svc","xyz"},$M$22:$M$1166))

    >
    >
    > --
    > redneck joe
    >
    >
    > ------------------------------------------------------------------------
    > redneck joe's Profile:

    http://www.excelforum.com/member.php...o&userid=32570
    > View this thread: http://www.excelforum.com/showthread...hreadid=535222
    >




  12. #12
    Ragdyer
    Guest

    Re: don't have a good thread title. (sumproduct?)

    Perhaps it's *mixed* data Bob, which might not necessarily make it *bad*.<g>
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "Bob Phillips" <[email protected]> wrote in message
    news:[email protected]...
    > Which means that you have text in a number field as I suggested. If you

    want
    > to ignore bad data, so be it.
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "redneck joe" <[email protected]>
    > wrote in message
    > news:[email protected]...
    > >
    > > And we have a winner....
    > >
    > > thank a million for the help.
    > >
    > > j
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > daddylonglegs Wrote:
    > > > You could still use SUMIF....
    > > >
    > > > =SUM(SUMIF($L$22:$L$1166,{"1svc","xyz"},$M$22:$M$1166))

    > >
    > >
    > > --
    > > redneck joe
    > >
    > >
    > > ------------------------------------------------------------------------
    > > redneck joe's Profile:

    > http://www.excelforum.com/member.php...o&userid=32570
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=535222
    > >

    >
    >



  13. #13
    Bob Phillips
    Guest

    Re: don't have a good thread title. (sumproduct?)

    That may be so RD, but firstly the OP never stated this, so it makes me
    think that this is not known, which means a potential error is being
    overlooked. Secondly, it is summing based upon a condition, which
    possibly/probably precludes the *mixed* data. There is a strong possibility
    that there are either text lookie numbers there, or so much data that there
    is text buried in there. Either way I think the OP should satisfy themselves
    that it is okay to ignore that data.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Ragdyer" <[email protected]> wrote in message
    news:[email protected]...
    > Perhaps it's *mixed* data Bob, which might not necessarily make it

    *bad*.<g>
    > --
    > Regards,
    >
    > RD
    >
    > --------------------------------------------------------------------------

    -
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > --------------------------------------------------------------------------

    -
    > "Bob Phillips" <[email protected]> wrote in message
    > news:[email protected]...
    > > Which means that you have text in a number field as I suggested. If you

    > want
    > > to ignore bad data, so be it.
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > (remove nothere from email address if mailing direct)
    > >
    > > "redneck joe" <[email protected]>
    > > wrote in message
    > > news:[email protected]...
    > > >
    > > > And we have a winner....
    > > >
    > > > thank a million for the help.
    > > >
    > > > j
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > daddylonglegs Wrote:
    > > > > You could still use SUMIF....
    > > > >
    > > > > =SUM(SUMIF($L$22:$L$1166,{"1svc","xyz"},$M$22:$M$1166))
    > > >
    > > >
    > > > --
    > > > redneck joe
    > > >
    > > >

    > >

    > ------------------------------------------------------------------------
    > > > redneck joe's Profile:

    > > http://www.excelforum.com/member.php...o&userid=32570
    > > > View this thread:

    > http://www.excelforum.com/showthread...hreadid=535222
    > > >

    > >
    > >

    >




  14. #14
    Ragdyer
    Guest

    Re: don't have a good thread title. (sumproduct?)

    I agree with what you're saying, and that's the *exact* reason that I prefer
    the asterisk version of SumProduct over the double unary version.
    The asterisk version *forbids* an inclusion of text by returning the #VALUE!
    error, while *still* calculating numeric text.
    The unary version bypasses text entries and allows calculations *excluding*
    the POSSIBLY incorrect numeric and/or alpha text entry, therefore masking an
    incorrect conclusion.
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "Bob Phillips" <[email protected]> wrote in message
    news:[email protected]...
    > That may be so RD, but firstly the OP never stated this, so it makes me
    > think that this is not known, which means a potential error is being
    > overlooked. Secondly, it is summing based upon a condition, which
    > possibly/probably precludes the *mixed* data. There is a strong

    possibility
    > that there are either text lookie numbers there, or so much data that

    there
    > is text buried in there. Either way I think the OP should satisfy

    themselves
    > that it is okay to ignore that data.
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Ragdyer" <[email protected]> wrote in message
    > news:[email protected]...
    > > Perhaps it's *mixed* data Bob, which might not necessarily make it

    > *bad*.<g>
    > > --
    > > Regards,
    > >
    > > RD
    > >

    >
    > --------------------------------------------------------------------------
    > -
    > > Please keep all correspondence within the NewsGroup, so all may benefit

    !
    >
    > --------------------------------------------------------------------------
    > -
    > > "Bob Phillips" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > Which means that you have text in a number field as I suggested. If

    you
    > > want
    > > > to ignore bad data, so be it.
    > > >
    > > > --
    > > > HTH
    > > >
    > > > Bob Phillips
    > > >
    > > > (remove nothere from email address if mailing direct)
    > > >
    > > > "redneck joe"

    <[email protected]>
    > > > wrote in message
    > > > news:[email protected]...
    > > > >
    > > > > And we have a winner....
    > > > >
    > > > > thank a million for the help.
    > > > >
    > > > > j
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > daddylonglegs Wrote:
    > > > > > You could still use SUMIF....
    > > > > >
    > > > > > =SUM(SUMIF($L$22:$L$1166,{"1svc","xyz"},$M$22:$M$1166))
    > > > >
    > > > >
    > > > > --
    > > > > redneck joe
    > > > >
    > > > >
    > > >

    > > ------------------------------------------------------------------------
    > > > > redneck joe's Profile:
    > > > http://www.excelforum.com/member.php...o&userid=32570
    > > > > View this thread:

    > > http://www.excelforum.com/showthread...hreadid=535222
    > > > >
    > > >
    > > >

    > >

    >
    >



+ 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