+ Reply to Thread
Results 1 to 3 of 3

Problem using not equal (<>) in array formula

  1. #1
    Registered User
    Join Date
    04-08-2004
    Posts
    39

    Problem using not equal (<>) in array formula

    Hello everyone,

    I have this array formula and it works fine:

    {=AVERAGE(IF(raw!$V$2:raw!$V$5000="Joe Sample",raw!$AA$2:raw!$AA$5000))}

    Now I want to calculate the average for everyone EXCEPT Joe Sample, so instead of an equal sign, I put <>"Joe Sample" as shown below:

    {=AVERAGE(IF(raw!$V$2:raw!$V$5000<>"Joe Sample",raw!$AA$2:raw!$AA$5000))}

    With this formula, I get a number that I don't know where it comes from. Its supposed to be 4.5 but I get 0.19.

    Why does this not work? Thanks.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    It sounds like you have some blank values in the list to be averaged. Those values will be calculated as part of the average. For instance, if the Non-"Joe Sample" items are: 1000, Blank, Blank, Blank, then the average will be 250, not 1000.

    Is that the case?

    If yes, then this formula should work:

    =SUM(($V$3:$V$5000<>"Joe Sample")*($AA$3:$AA$5000<>"")*$AA$3:$AA$5000)/SUM((($V$3:$V$5000<>"Joe Sample")*($AA$3:$AA$5000<>"")))

    I hope that helps.

    Ron
    Last edited by Ron Coderre; 04-13-2005 at 12:40 PM.

  3. #3
    Registered User
    Join Date
    04-08-2004
    Posts
    39
    You hit the nail right on the head.
    It works brilliantly. Thank you very much.

+ 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