+ Reply to Thread
Results 1 to 7 of 7

Can you sum within a formula?

  1. #1
    Registered User
    Join Date
    01-15-2021
    Location
    usa
    MS-Off Ver
    2020
    Posts
    4

    Can you sum within a formula?

    I have an excel sheet with average formulas. Within these average formulas there a fair amount of data.

    Example
    Average(5,10,15,8) which is 9.5

    Is there any way in a different cell I can have a formula that would add the numbers inside the average formula? Inside the average formula is the only place I have the numbers. So for the example above I would like this new cell to tell me 38. Is this even possible? In the end, I would like to have both an average and sum cell.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,414

    Re: Can you sum within a formula?

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    01-15-2021
    Location
    usa
    MS-Off Ver
    2020
    Posts
    4

    Re: Can you sum within a formula?

    I only have the numbers within the average formula. I would like to have them both and when I add a new number into the average formula have a sum formula add all the numbers in the average formula. The value are not in a table. Only in the average formula. I would like to have this sum formula update as I enter more numbers into the average formula. I'm just curious if this is even possible.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,414

    Re: Can you sum within a formula?

    I don’t know, to tell the truth. I thought you meant that they were part of a more complex formula. You might be able to do something with FORMULATEXT.

    Do you have Office 365? There is no Excel 2020 yet.

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

    Re: Can you sum within a formula?

    Wouldn't it be easier, as you add numbers to add each number to a new cell, ie. A1=5, A2=10, A3 = 15, etc.
    Then your average formula would be =AVERAGE(A1:A100) and Sum would be =SUM(A1:A100)
    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
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Can you sum within a formula?

    As an exercise, here's what I did to extract and sum the numbers using a formula
    With your AVERAGE Formula in cell B1
    I created a relative defined name (in case you plan on doing this down a column) called Extraction (in the Defined Name Manager on Formula Tab)
    My active cell is C1 (just to the right of the Average Formula.
    Extraction =
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    . Then the formula in C1
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    See attachment
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-11-2021
    Location
    CANADA
    MS-Off Ver
    Excel 2007, Office 2019
    Posts
    31

    Re: Can you sum within a formula?

    =a1*(len(formulatext(a1))-len(substitute(formulatext(a1),",",""))+1)

+ 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. Replies: 3
    Last Post: 03-24-2020, 07:27 AM
  2. Replies: 3
    Last Post: 01-10-2019, 09:34 AM
  3. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  4. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  5. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  6. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  7. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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