+ Reply to Thread
Results 1 to 5 of 5

Creating many sumif statements

  1. #1
    Registered User
    Join Date
    06-19-2015
    Location
    Alexandria, US
    MS-Off Ver
    2013
    Posts
    2

    Creating many sumif statements

    I've got two very long columns. The first column has a bunch of different numbers, the second column has an indicator of "1".
    My goal is to create a new column that sums the values in column 1 every time the indicator from column 2 is 1.

    I created a sample table of what this new column will look like below.

    Can someone please help me!

    0.1 0 0
    0.5 1 0.6
    0.9 0 0
    0.7 1 1.6
    Last edited by vam4pe; 12-03-2015 at 01:26 PM.

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

    Re: Creating many sumif statements

    Your sample table appears to have disappeared. ;-)
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

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

    Re: Creating many sumif statements

    Assuming that you data start (below a header column) in A2 and B2...

    =IF(B2=1,SUM($A$2:A2)-SUM($C$1:C1),0)

    Paste this into C2 and copy down
    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

  4. #4
    Registered User
    Join Date
    06-19-2015
    Location
    Alexandria, US
    MS-Off Ver
    2013
    Posts
    2

    Re: Creating many sumif statements

    Thank you so much Glenn. That is some good logic!

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

    Re: Creating many sumif statements

    You're welcome and thanks for the Rep.

+ 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] Sumif statements
    By Sasquatch2014 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-12-2014, 11:29 AM
  2. [SOLVED] Combining SUMIF Statements
    By Phil Hageman in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-19-2013, 10:20 AM
  3. Wildcards in SUMIF statements
    By peterandrewsuk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2013, 05:04 PM
  4. Multiple Sumif Statements
    By wake74 in forum Excel General
    Replies: 5
    Last Post: 02-02-2012, 04:45 PM
  5. SUMIF embedded with AND statements
    By durfe1jp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-03-2008, 02:05 PM
  6. sumif statements
    By vivi in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-27-2006, 01:25 PM
  7. [SOLVED] SumIf or SumProduct or If statements
    By Mike W in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2005, 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