+ Reply to Thread
Results 1 to 4 of 4

Formula needed to get average of values

  1. #1
    Forum Contributor
    Join Date
    02-23-2013
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    130

    Exclamation Formula needed to get average of values

    Hi All,

    I have an excel sheet with values as below

    Please Login or Register  to view this content.
    I need to get the average values of each row in another sheet. As shown above, the values will be there in alternate cells like ColA,ColC etc

    Requirement is:

    1. If any of the alternate cells has value then need to take the average
    2. If alll alternate cells are blank then the resultant cell should also be blank.
    3. If all the alternate cell values are zero then resultant cell should be blank.

    Currently I am using the below formula which is satisfying first two of my requirement but not 3rd.

    The formula is

    Please Login or Register  to view this content.
    If the values in all the aternate cells are zero, then as per the formula above it will just take the average which is zero and place it in the resultant cell. But per my requirement the resultant cell should be blank in this case. Please help me how to do this.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Formula needed to get average of values

    Based on your sample, try this, copied down...

    =IF(COUNT(A2:E2)=0,"",AVERAGE(A2:E2))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    02-23-2013
    Location
    Bangalore
    MS-Off Ver
    2010
    Posts
    130

    Re: Formula needed to get average of values

    Quote Originally Posted by FDibbins View Post
    Based on your sample, try this, copied down...

    =IF(COUNT(A2:E2)=0,"",AVERAGE(A2:E2))
    Hi,

    Thanks for your reply but the problem with your formula is it will try to average all the values from A2 to E2 right? but I want to get average values from alternate cells..

    like, average of values from A2,C2,E2,F2 etc..

    And if there is no value in those cells then resultant cell should be blank.
    If all the values is zero in the cell then the resultant cell should be blank.
    It should place the average of values only if the values present in those cells are greater than zero..

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Formula needed to get average of values

    If you dont have values between those columns, then my sugestion will still work. If you do have values in between, thenh take a look at using AVERAGEIF() or AVERAGEIFS() to only pick out those columns based onteh column headings.

    If you still have a problem, please upload a dummy workbook, showing samples of the data you are working with (no sensitive data), and a few examples of your expected outcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Some help needed with an average formula...
    By hello its dean in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-11-2013, 12:31 PM
  2. Macro needed to average values on a per day basis, help please!!!
    By khoadphamm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2012, 02:42 PM
  3. [SOLVED] Formula needed to find AVERAGE over last 21 values > zero or null
    By Skidder in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-02-2012, 06:44 PM
  4. Specialized average formula needed
    By jman0707 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-14-2009, 02:08 PM
  5. Average needed, but want to exclude some values
    By hibiscus27 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2007, 10:49 AM

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