+ Reply to Thread
Results 1 to 5 of 5

Average as Text

  1. #1
    Registered User
    Join Date
    03-04-2008
    Posts
    32

    Cool Average as Text

    I have lot of rows that have the values of either A,B,C or D I need to get the average of these rows in a seperate column but in a text value.

    Hope this makes sense

    Any help would be appreciated

    Regards
    Johncon

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454
    Hi,

    I think this is what you need.

    If your data is in column A,

    =CHOOSE(ROUND((COUNTIF(A:A,"A")+2*COUNTIF(A:A,"B")+3*COUNTIF(A:A,"C")+4*COUNTIF(A:A,"D"))/COUNTA(A:A),0),"A","B","C","D")

    will produce the "average"
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    03-04-2008
    Posts
    32

    Red face

    Thanks

    I have adapted it to rows.
    =CHOOSE(ROUND((COUNTIF(C13:R13,"A") +2*COUNTIF(C13:R13,"B") +3*COUNTIF(C13:R13,"C")+4*COUNTIF(C13:R13,"D"))/COUNTA(C13:R13),0),"A","B","C","D")

    But this still does not give the averages.

    If I have all 16 columns as "D" then the average is "D" but if i change 2 columns to "A" then the average changes to "C"

    as you can see this in not quite right.

    Cheers
    JohnCon

  4. #4
    Registered User
    Join Date
    03-04-2008
    Posts
    32

    Smile

    Dave

    My apologies

    I have just run the same thing as numerical values and it is correct, it just did not look right

    Many thanks again for your help

  5. #5
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454
    No worries. I'm glad it worked.

+ 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