+ Reply to Thread
Results 1 to 8 of 8

How can I create a SUM formula for an unknown amount of numbers in a column?

  1. #1
    Registered User
    Join Date
    12-17-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    3

    How can I create a SUM formula for an unknown amount of numbers in a column?

    I'm creating a template for a coworker, and I need to sum a column in a given sheet. The fields are usually entered by pasting the information from a different location, and these numbers are never the same every month. The easy solution would be to put the sum above the data, but I'm trying to do things right.

    From all the research I've done so far, the cleanest solution seems to be to add a scroll bar, but that doesn't seem like it's intended for what I'm doing.

    Oh, and this template will have four sheets with the same layout (one for each week a month), if that makes any difference.

    For reference, up to now, she (and all other account executives) are doing things the hard way. Most things are hard coded and written out manually each week/month.


    Thanks in advance for any help.

  2. #2
    Registered User
    Join Date
    12-04-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: How can I create a SUM formula for an unknown amount of numbers in a column?

    This formula will sum the "A" column, then divide by the number of cells that contain numbers in that column. It ignores any cell that is text. To change the column that it culculates, just change all of the "A"s to the proper letter.

    =(Sum(A:A)/Count(A:A))

    You can restrict how far down the spreadsheet the formular calculates as well. Just add the numbers of the cells next to the letters.

    (i.e. =(Sum(A3:A500)/Count(A3:A500)))
    This adds up all values between A3 and A500. Than it divides by the number of cells it found between A3 and A500 that have numbers in them.

  3. #3
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: How can I create a SUM formula for an unknown amount of numbers in a column?

    OP:
    I don't see why putting the average above the data is not doing things right. If you really insist, you can hide a few hundred rows between the top of your table and your average line - like:

    Row 1
    Row 2
    Row 3 - headings of table
    Row 4 - first line of data
    <500 hidden rows>
    Row 504 - average formula

    Pasting into row 4 will give the right result without the bottom of the table moving.

    A second alternative (to just putting the average at the top) is to turn the table into a list - just search the Excel help for 'lists'

    tplunkett:
    =(sum(A:A)/count(A:A))
    is equivalent to
    =sum(A:A)/count(A:A)
    (the brackets don't add anything
    more to the point, it's equivalent to
    =average(A:A)
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  4. #4
    Registered User
    Join Date
    12-17-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: How can I create a SUM formula for an unknown amount of numbers in a column?

    @Cheeky Charlie: I think that I will just put it on top after all. Thanks for the help though, I guess it's not such a bad thing.

    @tplunkett41: I tried it this way but it didn't work out. I will just give in and put the formula above and use a simple sum for an entire column.


    Thanks for the replies.

  5. #5
    Forum Contributor Steve N.'s Avatar
    Join Date
    12-22-2011
    Location
    USA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    298

    Re: How can I create a SUM formula for an unknown amount of numbers in a column?

    Have you considered using a 'Table' rather than a range? You can do many different calcs within a table. If you can attach a sample of your data - I'll give it a go...

  6. #6
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: How can I create a SUM formula for an unknown amount of numbers in a column?

    I concur with Steve N. If you are careful, you can insert rows into a table, and the table can have a 'Total' row on the bottom.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  7. #7
    Registered User
    Join Date
    12-17-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: How can I create a SUM formula for an unknown amount of numbers in a column?

    Quote Originally Posted by Steve N. View Post
    Have you considered using a 'Table' rather than a range? You can do many different calcs within a table. If you can attach a sample of your data - I'll give it a go...
    Steve,

    The only question I have is can I make it so that pasted information is automatically turned into a table? I already have the headers for each column, so I just need it to calculate for data that's not there yet.

    I'm basically trying to make it so there's as little user interaction as possible, since it's a template.

  8. #8
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: How can I create a SUM formula for an unknown amount of numbers in a column?

    You cannot paste info and have it turn into a table, but you can paste new data into a table. Best if you play with a table to see how you can paste info into it. Use Ctrl-T to create a table.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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