+ Reply to Thread
Results 1 to 5 of 5

SUMIF & COUNTIF and omitting blanks

  1. #1
    Registered User
    Join Date
    06-28-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    SUMIF & COUNTIF and omitting blanks

    cant quite figure this one out so hoping and expert on here will be able to!


    In simple terms...


    Column A has project names

    Column B has a 2 char code in it

    Column C has a % complete stat (and is blank if the project has not yet started)


    I need to total up and then average the % complete where the 2 char code in column B = a certain value.

    For example, for any cell in column B that contains EI I want the average value across column C.

    I have the following formula for that....

    =SUMIF($B$4:$B$30,$F4,C$4:C$30)/COUNTIF($B$4:$B$30,F$4) (where F4 = my 2 char code)

    Now this works a treat BUT I want to only divide it by projects that have actually started and have a % value (ie not blank or 0).

    Any idea how to achieve this? I hope that made sense!

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: SUMIF & COUNTIF and ommiting blanks

    Could you upload an example? I think a sunmproduct formula would work but don't know exactly how your data looks.
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  3. #3
    Registered User
    Join Date
    06-28-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: SUMIF & COUNTIF and omitting blanks

    Hopefully this example will show what I want to acheive. In D11 I want to show the average % (column d) for all those with the code in column C that matches the criterea (D13).

    But, you will see that row 7 matches the criterea but it has no % value (it's blank) so I want this one ingonred from the average calculation becuase this project has not started yet.

    Any ideas?
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: SUMIF & COUNTIF and omitting blanks

    You could as outlined used a SUMPRODUCT for the divisor else you could use an Average Array formula

    =AVERAGE(IF((C4:C9=D13)*ISNUMBER(D4:D9),D4:D9))
    confirmed with CTRL + SHIFT + ENTER

  5. #5
    Registered User
    Join Date
    06-28-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: SUMIF & COUNTIF and omitting blanks

    worked a treat, thanks!

+ 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