+ Reply to Thread
Results 1 to 2 of 2

Average using SUMIF/COUNTIF help...

  1. #1
    Registered User
    Join Date
    07-23-2004
    Posts
    9

    Average using SUMIF/COUNTIF help...

    Hello,

    I'm currently trying to work out how I can make a formula without using an IF in an IF in an IF in an IF etc.....

    I am trying to work out the average sales data on a product by totalling the last 6 months /6.

    Eg 1:
    Jan Feb Mar Apr May Jun
    500 423 586 951 142 214 Ttl/6 = 469.34 (Average monthly sales)

    However, it falls down if the item is new and has only been selling for the last 6 months.

    Eg 2:
    Jan Feb Mar Apr May Jun
    000 000 000 452 426 512 Ttl/6 = 231.67 (Average monthly sales)

    In example 2 - I need the formula to automatically exclude the 0's and divide by how many values >0 are present. So far, I ahve this:

    =(SUMIF(A1:F1,">0"))/(COUNTIF(A1:F1,">0"))

    ....but I can only use this in a range... the problem is, my cells are seperated and not in a range - so I would need the equivalent of:

    =(SUMIF(A1,A5,A9,A11, ">0")) / (COUNTIF(A1,A5,A9,A11, ">0"))

    ....any ideas how can I do this?

    Thanks!

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    If you can make your zero values either blank or a text entry (e.g. '- ; or 'x' or N/A) you can simply use the Average function, which will sum numeric values and divide by the count of those values.

    For your example:

    =AVERAGE(A1,A5,A9,A11) where zeros have been replaced by 'x'

    Of course, any zeros in this range will be included in the calculation.

    HTH
    Bruce
    The older I get, the better I used to be.
    USA

+ 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