+ Reply to Thread
Results 1 to 5 of 5

why this array produces an error?

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Red face why this array produces an error?

    Hi,

    I tried to use an array to calculate the mean score for a column: if a cell has a value 'A', then it is assigned a value 1, if 'B', then 2, if 'C', then 3.

    But this resulted an error. Can you have a look at the file attached here. Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: why this array produces an error?

    hi BNCOXUK, does an AVERAGE work for you?
    =AVERAGE(IF(A1:A3="A",1,IF(A1:A3="B",2,IF(A1:A3="C",3,""))))

    a NAME error basically means you spelled the formula wrongly or there's no such formula

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: why this array produces an error?

    Use AVERAGE() instead of MEAN()
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: why this array produces an error?

    Quote Originally Posted by benishiryo View Post
    hi BNCOXUK, does an AVERAGE work for you?
    =AVERAGE(IF(A1:A3="A",1,IF(A1:A3="B",2,IF(A1:A3="C",3,""))))

    a NAME error basically means you spelled the formula wrongly or there's no such formula
    Wow, what a stupid mistake It worked now. Thanks.

  5. #5
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    347

    Re: why this array produces an error?

    Quote Originally Posted by NBVC View Post
    Use AVERAGE() instead of MEAN()
    Thanks, NBVC.

+ 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