+ Reply to Thread
Results 1 to 5 of 5

Cells not reading as numbers when average is used. Giving #VALUE! error.

  1. #1
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Cells not reading as numbers when average is used. Giving #VALUE! error.

    Hi all.

    I have a set of 10 cells, say A2 thru A11, that have random numbers anywhere from 0 to around 20. I run an average with the AVERAGE function to get the average, which it does. Then I have in say B2, the formula =SUMPRODUCT(--MID(M15,ROW(INDIRECT("1:"&LEN(M15))),1)) to give me a sum total. If it is a single average total of 0-9, it will five me the sum product but it is not recognized as a number. If it is 10 or greater, it gives the #value! error. I have tried formatting the cells, but does not help. Anyone know as to why it's not reading as a number, or what may be going on. I've also tried running the AVERAGE function as an ARRAY, vice-versa and both. None of which works. I know this is something simple I am just missing, but can not for the life of me figure out what it is. It's like it's reading as TEXT, but isn't.

    Thank you so much for any help and even looking at this for me!

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Cells not reading as numbers when average is used. Giving #VALUE! error.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Cells not reading as numbers when average is used. Giving #VALUE! error.

    Hopefully this will make sense and I can find out what the problem with it is.

    Thank you very much!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Cells not reading as numbers when average is used. Giving #VALUE! error.

    Use the Formulas > Evaluate Formula feature to step through the evaluation of the SUMPRODUCT formula in C16.

    At some point, we see SUMPRODUCT(--{"4";".";"8"}).

    --"." causes the #VALUE error.

    D16 is actually 4.8. It only appears be 5 due to the cell format (Number with 0 decimal places).

    I don't understand why you are summing the digits of the average. But perhaps this does what you need.

    Array-enter (press ctrl+shift+Enter instead just Enter) the following formula:

    =SUM(IFERROR(--MID(D16, ROW(INDIRECT("1:"&LEN(D16))), 1), 0))
    Last edited by joeu2004; 02-18-2018 at 02:33 AM. Reason: minor

  5. #5
    Forum Contributor
    Join Date
    08-07-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Cells not reading as numbers when average is used. Giving #VALUE! error.

    Quote Originally Posted by joeu2004 View Post
    Use the Formulas > Evaluate Formula feature to step through the evaluation of the SUMPRODUCT formula in C16.

    At some point, we see SUMPRODUCT(--{"4";".";"8"}).

    --"." causes the #VALUE error.

    D16 is actually 4.8. It only appears be 5 due to the cell format (Number with 0 decimal places).

    I don't understand why you are summing the digits of the average. But perhaps this does what you need.

    Array-enter (press ctrl+shift+Enter instead just Enter) the following formula:

    =SUM(IFERROR(--MID(D16, ROW(INDIRECT("1:"&LEN(D16))), 1), 0))
    Thank you for the reply and help joeu2004! That worked great as long as it is a single digit cell. When it is a double digit or larger cell though, it still gives the error. You did point out the decimal and that was the problem. I just used the ROUNDUP function before the AVERAGE in the formula and that got rid of the problem, so thank you!

    I'm working on a random environment and the average needs to be summed up in my situation to get the end result. With the summed average, I'm predicting around 70% accurately more consistently.

+ 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. average cells that only contain numbers
    By superchew in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-10-2016, 05:02 PM
  2. [SOLVED] Average only cells that contain numbers
    By April in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-17-2014, 03:46 PM
  3. Replies: 14
    Last Post: 06-14-2013, 09:00 PM
  4. [SOLVED] How to average a column of numbers greater than 0, not giving div 0 error
    By TERRI LEE in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-01-2012, 05:03 AM
  5. Excel 2007 - not reading cells as numbers
    By garybarrow in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-27-2010, 01:21 PM
  6. checking cells are empty and giving error message
    By Nick_in_Dubai in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2009, 05:17 AM
  7. Reading/lookup Data from excel by giving a querry
    By helloexcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2008, 07:13 PM

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