+ Reply to Thread
Results 1 to 8 of 8

Average Calculation

  1. #1
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Average Calculation

    Hi Experts,

    I have a formula like this:

    =IFERROR(VLOOKUP(B4,INDIRECT("'"&$C$2&"'!"&"B28:H77"),2,0),0)+IFERROR(VLOOKUP(B4,INDIRECT("'"&$D$2&"'!"&"B28:H77"),2,0),0)+IFERROR(VLOOKUP(B4,INDIRECT("'"&$E$2&"'!"&"B28:H77"),2,0),0)+IFERROR(VLOOKUP(B4,INDIRECT("'"&$F$2&"'!"&"B28:H77"),2,0),0)

    Output

    =10+20+0+30

    more than Zero value =3

    Here I want the formula to calculate the average by which gives the value more than 0
    i.e 60/3=20 IF four no found more than zero 60/4

    Thanks in advance..!
    Attached Files Attached Files
    Last edited by Manikandan Arumugam; 03-29-2017 at 05:47 AM. Reason: Attachment
    Manikandan Arumugam
    Excel Learner

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Average Calculation

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Re: Average Calculation

    Glenn,

    Sorry for it. Attached the sample

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Average Calculation

    So you want the average of the non-zero values that match the criterion "XYZ", or "ABC" etc???

    If so, use this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Re: Average Calculation

    Thanks Glenn, You are great.

    Glenn, but what to do when headers interchanged. Like when Col H (X12) changed to Col G

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Average Calculation

    So. Do you want the formula to be draggable across the columns?

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Average Calculation

    Try this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    copied across and down...
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    02-14-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    128

    Re: Average Calculation

    Thanks Glenn

+ 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. Average calculation per persoon
    By AaruJaan in forum Excel General
    Replies: 2
    Last Post: 02-12-2017, 05:50 PM
  2. Calculation of average in vba
    By zimotgio in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-12-2014, 10:19 AM
  3. average calculation
    By deth in forum Excel General
    Replies: 4
    Last Post: 06-08-2012, 01:59 PM
  4. Average calculation
    By Areaka in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-04-2007, 09:46 PM
  5. [SOLVED] Calculation help from average total
    By Middlemix in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2006, 09:30 AM
  6. [SOLVED] average calculation
    By blackstar in forum Excel General
    Replies: 1
    Last Post: 02-04-2006, 03:50 PM
  7. Average Calculation
    By smallcap in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-27-2005, 08:05 PM

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