+ Reply to Thread
Results 1 to 3 of 3

sum the first column between the incidences of a 2 appearing

Hybrid View

demarc sum the first column between... 03-10-2015, 02:36 AM
Pepe Le Mokko Re: sum the first column... 03-10-2015, 03:54 AM
demarc Re: sum the first column... 03-10-2015, 04:02 AM
  1. #1
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2016 (Office 365)
    Posts
    137

    sum the first column between the incidences of a 2 appearing

    Question.xlsx

    Hi all,

    I have a problem that I cannot solve and would love some advice. In the attached file I have two columns of data. The first column of has a bunch on 0's 1's and 2's and what I am trying to do in the second column is sum the first column between the incidences of a 2 appearing. The problem I am having is coming up with a formula that has a variable range that says something like:

    =IF(B7=2, SUM("all the 1's column B from this row up until you get to another 2 in column B"),"")

    I have not posted here for a long time so hope the attachement works.

    Thanks for any assistance you can provide.

    Cheers,
    Marcus

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

    Re: sum the first column between the incidences of a 2 appearing

    Perhaps this in C4 and pulled down?
    =IF(B4=2,SUM(B$3:$B3)-SUM(C$3:$C3)-2*COUNTIF($B$3:B3,2),"")

  3. #3
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2016 (Office 365)
    Posts
    137

    Re: sum the first column between the incidences of a 2 appearing

    That works fine, thanks for the quick reply!

    Cheers,
    Marcus

+ 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. VBA to list files not appearing in column
    By dagsvic in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2013, 06:28 AM
  2. filename appearing in a column
    By darkhorse4321 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-25-2010, 04:11 AM
  3. Detecting all the incidences of a value
    By scienceonstage in forum Excel General
    Replies: 4
    Last Post: 10-25-2010, 03:41 PM
  4. [SOLVED] values are appearing automatically in the next column
    By psdonline in forum Excel General
    Replies: 0
    Last Post: 07-12-2006, 05:45 PM
  5. Recording incidences of results of a RAND() fucntion.
    By BaldySlaphead in forum Excel General
    Replies: 1
    Last Post: 07-15-2005, 11: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