+ Reply to Thread
Results 1 to 8 of 8

Finding average of a range of numbers

  1. #1
    Registered User
    Join Date
    12-07-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    2

    Finding average of a range of numbers

    Hi all,
    I have been provided with a list of reading ages but they have been provided as ranges e.g 7year and 7 months to 7 years and 9 months is written as 7.07 - 7.09 in a cell for example. I need to find the average of the column. Is there a function and formula which could calculate this or would I need to split the columns find the average of each row and then average the columns?

    Spelling age
    5.04-5.05
    6.04-6.05
    7.05-7.06
    6.04-6.05
    6.11-7
    8.09-8.11

    #DIV/0!

    Any advise would be appreciated

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Finding average of a range of numbers

    Administrative note

    Welcome to the forum

    in your haste to solve your problem, you probably missed the yellow banner advising how to get answers faster by posting a sheet ?

    Please take a moment to read it and attach a sheet accordingly.

    Thanks you for helping us help you

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,821

    Re: Finding average of a range of numbers

    These are text strings, and Excel does not know how to take the average of text strings. You will need to give Excel a single number that represents each range, and then average that value. One possible approach (using the lower boundary of the age range as the value).

    1) In a helper column, separate out the first number (left 4 characters of the text string) and convert to a number VALUE(LEFT(text,4)). Note that I am assuming 4 characters is correct -- that there will never be an age 10 years or over.
    2) Convert year.month number to a decimal year using DECIMALDE() function =DECIMALDE(VALUE(...),12). Copy/paste/fill this formula down to the bottom of the data.
    3) Compute the average (in decimal years) using the AVERAGE() function =AVERAGE(helper column).
    3a) If necessary, round result to the nearest month (1/12 of a year) =MROUND(AVERAGE(...),1/12)
    4) If necessary, convert decimal year back into year.month using DOLLARFR() function =DOLLARFR(AVERAGE(...),12) or DOLLARFR(MROUND(...),12)

    Will something like that work for you?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    12-07-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Finding average of a range of numbers

    Just attaching example
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Finding average of a range of numbers

    We still need to know what you expect as a result and why? Will you just be averaging the lower boundries? or both lower and upper boundries? Or mid points?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,821

    Re: Finding average of a range of numbers

    Exactly what I proposed won't work, because there are 10+ ages in there and because you don't include the .months for whole year values. I won't try to correct it, because it was just a simple illustration of the "convert the text string age range to a number" step, and I'm not even sure if that is a suitable choice for number. I think the overall idea still stands -- you need some way to get these text strings into a suitable number. For that matter, are you required to use this for data entry? Could you replace the data entry step with something that just enters a number (whether decimal year or total month or year.month)? Sometimes this sort of thing can be "fixed" at the data entry step rather than at the formula programming step.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Finding average of a range of numbers

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This will average the midpoint of each range

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,025

    Re: Finding average of a range of numbers

    What format do you want the results in? Here are two approaches...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ 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. [SOLVED] Formula for finding the average of a range (two numbers separated by a hyphen)
    By tukae in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-30-2019, 01:14 AM
  2. Replies: 7
    Last Post: 06-23-2018, 09:49 AM
  3. [SOLVED] finding an average of the 10 low numbers.
    By usbrunsbr in forum Excel General
    Replies: 3
    Last Post: 07-28-2015, 04:17 PM
  4. [SOLVED] Finding average value for the positive and negative set of numbers
    By thilag in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-26-2014, 04:39 AM
  5. Finding average of values that are not numbers
    By kyopsis23 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-14-2014, 02:35 PM
  6. Replies: 2
    Last Post: 02-17-2011, 02:22 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