+ Reply to Thread
Results 1 to 14 of 14

calculating average from text cells

  1. #1
    Registered User
    Join Date
    03-21-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2013
    Posts
    15

    calculating average from text cells

    Hello excel pros!
    I have a problem. I have to calculate average availability from 4 drop down menu choices. Choices are text cells. Each choice basically is equal to constant number.
    Is it possible to calculate average w/o using additional column? (See excel attached)

    P.S. Right now only possible solution that i can think of is adding that number in front of text in each cell and in additional column using LEFT function get that number and calculate avarage from them. Seems a bit too ugly solution...
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: calculating average from text cells

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

  3. #3
    Registered User
    Join Date
    03-21-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: calculating average from text cells

    count is not fixed (users are adding new rows)

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: calculating average from text cells

    Convert the range to a Table

    Add header values to A3 and B3
    Highlight A3:B8
    On the INSERT tab, click Table. Check My Table Has Headers - OK

    Now your formula will auto update when rows are added/deleted.

  5. #5
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: calculating average from text cells

    If you don't want a Table, create a Dynamic Named Range or use INDEX to locate the last cell.

  6. #6
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: calculating average from text cells

    Remove the example output and use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-21-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: calculating average from text cells

    something is not working with that formula

  8. #8
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: calculating average from text cells

    Gonna need to narrow it down a bit. "Not working" is not very specific or helpful.


    A
    B
    C
    D
    E
    F
    G
    1
    Situation right now:
    2
    #NAME?
    1.20
    availability
    1.2
    3
    0 easy
    =SUMPRODUCT(--(LEFT($A$4:INDEX($A:$A,COUNTA($A:$A)+1),1)))/COUNTA($A$4:INDEX($A:$A,COUNTA($A:$A)+1))
    4
    0 easy
    0
    1 ok
    5
    1 ok
    1
    2 hard
    6
    2 hard
    2
    3 impossible
    7
    3 impossible
    3
    8
    0 easy
    0
    9
    10
    Would like to:
    11
    12
    1.2
    availabilty
    13
    easy
    14
    easy
    ok
    15
    ok
    hard
    16
    hard
    impossible
    17
    impossible
    18
    easy
    19

  9. #9
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: calculating average from text cells

    Guessing it's probably because you have Calculation set to manual in that workbook.

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: calculating average from text cells

    It was because in the OP's original file, there was more data Below the end of the range he was working with.
    He was working with A4:A8
    But there was other data below that, example A10 was "Would like to"

    COUNTA saw that value, and made the range extend beyond the original dataset.

    So when it got to A10,
    LEFT("Would like to",1) = "W"
    --"W" = #Value!


    This is why I recommend converting the original range to a Table.



    Not to mention it may have been creating a circular reference if OP put that formula within column A.
    Last edited by Jonmo1; 03-15-2016 at 03:11 PM.

  11. #11
    Registered User
    Join Date
    03-21-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: calculating average from text cells

    Thanks! It's working! What about situation when in the beginning of each drop down choice is no number?

  12. #12
    Registered User
    Join Date
    03-21-2012
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2013
    Posts
    15

    Re: calculating average from text cells

    i have to put it in column A

  13. #13
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: calculating average from text cells

    You're welcome. Thanks for the rep. I did say
    Remove the example output and use:
    The formula was NOT in column A, so it's not an issue. Though, agreed, it would be an issue if it was in column A. But, spelling AVERAGE as AVARAGE is an issue

    It's taking the leftmost single character which, in your example, is numeric from 0 to 3. How do you plan to average a non numeric character?

  14. #14
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: calculating average from text cells

    i have to put it in column A
    Thought you said it was working? If it's not, use a Dynamic Named Range ... that would be similar to the formula used already.

+ 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. calculating average in cells, not including zeros
    By kingy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2014, 03:00 AM
  2. Replies: 10
    Last Post: 04-25-2013, 06:12 PM
  3. [SOLVED] calculating the average of the coloured cells
    By Mortada in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-21-2013, 07:18 PM
  4. Calculating an average but excluding boxes with text
    By KeiranMac in forum Excel General
    Replies: 12
    Last Post: 09-25-2009, 09:49 AM
  5. calculating average with blank cells
    By marvinks in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-07-2006, 11:34 AM
  6. [SOLVED] Calculating the average of cells
    By pippa in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-13-2006, 06:10 PM
  7. How do I ignore cells with errors when calculating an average?
    By M Enfroy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-01-2005, 04:09 PM

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