+ Reply to Thread
Results 1 to 9 of 9

Summing numbers only if they correspond to another column???

Hybrid View

  1. #1
    Registered User
    Join Date
    03-15-2014
    Location
    Nashville, TN
    MS-Off Ver
    365
    Posts
    33

    Summing numbers only if they correspond to another column???

    Been working on this forever so I decided to join this forum to try to find out. There has to be a better way on this.
    I added an attachment. Column A is my "week number" and column E is my sales amount.

    I'm trying to create a formula that sums the sales amount, only if it corresponds to a certain week number. I know sumif formulas, but can't get them to work well for this. For example, I want it to sum all the sale that happened in week one, then all the ones in week 2, then all the ones in week 3, and so on. There has to be an easier way than doing a sumif for each individual week and manually changing the week number in the sum if formula.

    Could there be a character you can use in a formula to make the sumif week number "running?" So you could then just type in the formula once and pull it all the way down for the year, so the formula will work for the every week throughout the year? Thanks so much for helping.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: Summing numbers only if they correspond to another column???

    hello
    I think this is what your after
    =SUMIF($A$1:$A$28,A1,$E$1:$E$28)
    you will need to extend the range to suit your data
    regards
    peter

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Summing numbers only if they correspond to another column???

    =SUMIF(A:A,ROWS($A$1:A1),E:E) would do that but it would be hard to pick out a week
    why notjust number say column g down 1 to 52 then =SUMIF(A:A,g1),E:E) and fill down
    or try in f1
    =IF(A2<>A1,SUMIF(A:A,A1,E:E),"") filled down
    Last edited by martindwilson; 03-15-2014 at 12:24 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Summing numbers only if they correspond to another column???

    Hi, and welcome to the forum

    In F1 and then copied / dragged down

    Formula: copy to clipboard
    =SUMIF(A:A,ROW(),E:E)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    03-15-2014
    Location
    Nashville, TN
    MS-Off Ver
    365
    Posts
    33

    Re: Summing numbers only if they correspond to another column???

    Quote Originally Posted by Richard Buttrey View Post
    Hi, and welcome to the forum

    In F1 and then copied / dragged down

    Formula: copy to clipboard
    =SUMIF(A:A,ROW(),E:E)

    Thanks for all the help guys; This is the answer I was looking for. Thanks again; saves me tons of time.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Summing numbers only if they correspond to another column???

    Please see attached file with formulas
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  7. #7
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: Summing numbers only if they correspond to another column???

    please see attached
    peter
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-17-2014
    Location
    Pakistan
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1

    Re: Summing numbers only if they correspond to another column???

    Quote Originally Posted by peterjuhnke View Post
    please see attached
    peter
    Just applied your trick to one of my own files, it worked, thanks man, you are the saviour

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Summing numbers only if they correspond to another column???

    lol id have thought since there are 52 unique weeks in a year just numbering from 1 to 52 would do
    but attached are 4 ways including a pivot table
    Attached Files Attached Files

+ 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. Summing numbers in a column with different lengths
    By jcon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2011, 12:02 PM
  2. Replies: 12
    Last Post: 04-24-2011, 05:45 PM
  3. Summing non zero numbers in a column.
    By kohaku in forum Excel General
    Replies: 4
    Last Post: 06-04-2009, 02:38 PM
  4. summing numbers based on 2nd column
    By John K in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-07-2006, 01:25 PM
  5. [SOLVED] Summing a column of Numbers
    By FLKULCHAR in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-07-2005, 02:05 AM

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