+ Reply to Thread
Results 1 to 7 of 7

Thread: 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
    Location: Location
    MS-Off Ver
    Excel 2007
    Posts
    266

    Re: Conditional Calculations

    If you want to leave column E in there, you can use;
    =SUMIF(E3:E7,">0")
    I '<3' reputation. If I helped, click the scales. This will be helping an internal departmental competition with co-workers.

    Reputation can be granted through the Scales Icon (for classic layout), or the little Star on the bottom of the post next to the blogging function for the new forum layout.

    If you're not busy, and really feel down on life, read my excel blog which may or may not have contents.

  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 TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,187

    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

  5. #5
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,187

    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 TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,187

    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.2.0