+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Conditional Calculations

  1. #1
    Registered User
    Join Date
    10-21-2011
    Location
    Usa, Usa
    MS-Off Ver
    Excel 2007
    Posts
    10

    Conditional Calculations

    Hi Folks,

    Here's what I'm trying to do.

    I'm trying to get a weighted average for a series of numbers, but if certain numbers in a column A are errors or negative numbers, I want to ignore them and still maintain the weighting. Check the data for clarification

    I have to do this for a large series of numbers, which is why an conditional statement would be easier.
    Attached Files Attached Files
    Last edited by JukeboxRobo; 10-31-2011 at 10:45 AM.

  2. #2
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: Conditional Calculations

    If you want to leave column E in there, you can use;
    =SUMIF(E3:E7,">0")
    Going for Guru! Click the Star to the bottom left of this post if I helped!

  3. #3
    Registered User
    Join Date
    10-21-2011
    Location
    Usa, Usa
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Conditional Calculations

    Quote Originally Posted by Miraun View Post
    If you want to leave column E in there, you can use;
    =SUMIF(E3:E7,">0")
    Hi Miraun,

    I appreciate your help.

    Unfortunately, due to the way the spreadsheet was set up, it doesn't have the space to keep something like column E. If I have something like Column E and try to hide it, it messes with the spacing. Is there any way I could do it through conditional statements in one cell?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,245

    Re: Conditional Calculations

    E3: =IFERROR(B3*C3,0) and copy down ( to eliminate #N/A errors)

    E8: =SUMIF(E3:E7,">0",E3:E7) to eliminate zero values


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,245

    Re: Conditional Calculations

    If you can eliminate the #N/A in column B, you can use:

    =SUMPRODUCT(--(B3:B7>0),--(B3:B7),--(C3:C7))

    Regards

  6. #6
    Registered User
    Join Date
    10-21-2011
    Location
    Usa, Usa
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Conditional Calculations

    TMShucks, this works perfectly! Thank you! I also added to your reputation.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,245

    Re: Conditional Calculations[Solved]

    You're welcome. Thanks for the rep.

    See my signature for details of how to mark your thread solved.

    Regards, TMS

+ 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