+ Reply to Thread
Results 1 to 9 of 9

SumIf

  1. #1
    Registered User
    Join Date
    12-12-2009
    Location
    Roanoke TX
    MS-Off Ver
    Excel 2007
    Posts
    50

    SumIf

    I have attached the spreadsheet for those who can help.

    If you scroll to the right you will be on the correct place in the sheet.(Starting with I1)

    What I need is to be able to come up with a formula for I4 which says if there is not a category or tag than do not include the amounts in the I4 cell.


    Is that clear or does it need any more explaining?

    Many Thanks!
    Adam
    Last edited by putnum; 12-27-2009 at 05:14 PM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,445

    Re: SumIf

    Hi,

    Try this:

    =SUMPRODUCT((L2:L1000)*(M2:M1000<>"")*(N2:N1000<>""))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    12-12-2009
    Location
    Roanoke TX
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: SumIf

    I am thinking this may need to be a array of some sort but not sure??

  4. #4
    Registered User
    Join Date
    12-12-2009
    Location
    Roanoke TX
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: SumIf

    Quote Originally Posted by sweep View Post
    Hi,

    Try this:

    =SUMPRODUCT((L2:L1000)*(M2:M1000<>"")*(N2:N1000<>""))
    awesome i think that did it. I am testing it now! I will let you know!!

  5. #5
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: SumIf

    Sumproduct deals with that the way SUM() does. My solution is similar to Sweep's

    =SUMPRODUCT(--($M$2:M1000<>""),--($N$2:$N$1000<>""),$L$2:$L$1000)
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  6. #6
    Registered User
    Join Date
    12-12-2009
    Location
    Roanoke TX
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: SumIf

    Can ya'll explain what these do in detail by chance?

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: SumIf

    Or, using Excel 2007,

    =SUMIFS(L2:L100, M2:M100, "<>", N2:N100, "<>")
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: SumIf

    Evaluate the formula and that will bring you all the info you need.

    SUMPRODUCT multiplies Arrays (ranges) one by one and then sums these.

    e.g.
    {1,0,1} * {1,1,0} * {34,64,1} = 34+0+0 = 34

    This $M$2:M1000<>"" will give you an array with FALSE, TRUE. Multiplying that with -- will end up in Ones and Twos

  9. #9
    Registered User
    Join Date
    12-12-2009
    Location
    Roanoke TX
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: SumIf

    sweet well that did it thanks guys!!!

+ 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