+ Reply to Thread
Results 1 to 11 of 11

Excel 2003 - averageif or sumif?

  1. #1
    Registered User
    Join Date
    10-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    17

    Question Excel 2003 - averageif or sumif?

    Hello,

    I searched and tried to find the answer for this problem of mine, but I wasn't able to get it working for me.

    I have a main sheet where all the averages should go, and 31 other sheets (1 for every day of the month). The table bellow shows an example of a sheet.

    A B C
    1 Name Something 1 Something 2
    2 Name 1 100 60
    3 Name 1 80
    4 Name 2 100 100

    In the Main sheet I would like to calculate the average only of Something 1 and only for Name 1.

    The function would:
    Check how many times Name 1 is in Column A, then check if on the same row there is a value in Column B, if there is no value, it should be ignored, so the average in this case, for Name 1 would be 100, if there was a "0" in cell "B3" the average would be 50.

    I need to get it working in excel 2003.

    Hope my question is understandable.

    Thank you in advance for your help
    Last edited by sai19; 10-24-2013 at 06:17 AM.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Excel 2003 help needed

    =SUMIF(A2:A4,"=Name1",B2:B4)/SUMPRODUCT(IF(A2:A4="Name1",1,0)*IF(B2:B4="",0,1))
    It's an array formula so you need to confirm with ctrl+shift+enter

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Excel 2003 help needed

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  4. #4
    Registered User
    Join Date
    10-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Excel 2003 help needed

    Thank you for your fast reply

    This works fine when all info is on the same sheet, but when I try to get the average from another sheet it doesn't work, I get the #NUM! error

    lets say the example sheet is called "example", I am trying:

    =SUMIF('example'!A2:A4;"=Name 1";'1'!B2:B4)/SUMPRODUCT(IF('example'!A2:A4="Name 1";1;0)*IF('example'!B2:B4="";0;1)) with the ctrl+shift+enter confirmation.

    like this I get the mentioned error.

    any way to get around this?

    Thanks again

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Excel 2003 - averageif or sumif?

    Are you trying to get data from a single sheet or do you want to work out an average across all 31 sheets?
    Audere est facere

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Excel 2003 - averageif or sumif?

    Can you upload a workbook with the formula and data as it is providing an error?

  7. #7
    Registered User
    Join Date
    10-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Excel 2003 - averageif or sumif?

    Sorry, this is for my work and am not allowed to share this data, but I would like to.

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Excel 2003 - averageif or sumif?

    Replace any sensitive data with dummy data and provide an example of the formula not working. I tried the formula as you posted and it did not give me a #NUM! error. It is possible that it is an issue with your data?

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Excel 2003 - averageif or sumif?

    Remove all private and confidential informations. Change names into xxxx and pirices into 1234 etc. Delete all extra contents that's not important for your problem.

  10. #10
    Registered User
    Join Date
    10-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Excel 2003 - averageif or sumif?

    Quote Originally Posted by daddylonglegs View Post
    Are you trying to get data from a single sheet or do you want to work out an average across all 31 sheets?
    From sheet 1 to sheet 31.

    I try: ('1:[31]31'!D:D) to get the info.

  11. #11
    Registered User
    Join Date
    10-22-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Excel 2003 - averageif or sumif?

    Quote Originally Posted by yudlugar View Post
    Replace any sensitive data with dummy data and provide an example of the formula not working. I tried the formula as you posted and it did not give me a #NUM! error. It is possible that it is an issue with your data?
    I tried it again and it worked, I selected the whole column (A:A) and (B:B) now changed to (A1:A150) and (B1:B150), now I just need to get the average from all the sheets (1 to 31), tried with:

    =SUMIF('1:4'!B1:B150;"=n_1";'1:4'!C1:C150)/SUMPRODUCT(IF('1:4'!B1:B150="n_1";1;0)*IF('1:4'!C1:C150="";0;1))

    like this I get the #VALUE! error

    Thanks for all the help

+ 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. Excel 2003 VBA Coding Help Needed
    By clprdctn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2013, 02:18 PM
  2. [SOLVED] Excel 2003 macro delete help needed
    By michaelb in forum Excel General
    Replies: 8
    Last Post: 04-02-2012, 09:20 PM
  3. [SOLVED] Excel 2003 start up help needed
    By michaelb in forum Excel General
    Replies: 2
    Last Post: 03-28-2012, 09:25 PM
  4. Help needed to fix the docking of VBE in Excel 2003
    By chamdan in forum Excel General
    Replies: 1
    Last Post: 11-12-2010, 02:34 AM
  5. Excel 2007 Formula needed in 2003
    By tek9step in forum Excel General
    Replies: 2
    Last Post: 02-26-2010, 09:43 AM

Tags for this Thread

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