+ Reply to Thread
Results 1 to 8 of 8

count up in Column A until the next non-blank cell in Column C

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    30

    count up in Column A until the next non-blank cell in Column C

    Hello, I'm giving myself a headache and am hoping someone can bail me out...

    I have values in Column A that need to Totaled in Column D when a new value is entered in Column C.

    Attached is a small Excel file of sample data.

    Sample Data.jpg

    In the Sample Data, in cell D11, I would like to return the sum of range A3:A11.
    In the Sample Data, in cell D14, I would like to return the sum of range A12:A14.

    I think I'm dealing with an Offset formula, but am going in circles trying to resolve

    Thank you in advance for your help!!
    Attached Files Attached Files
    Last edited by [email protected]; 12-02-2016 at 03:07 AM. Reason: Just to mark as solved.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,904

    Re: count up in Column A until the next non-blank cell in Column C

    d2
    Please Login or Register  to view this content.
    try this and copy towards down
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,904

    Re: count up in Column A until the next non-blank cell in Column C

    or
    d2
    Please Login or Register  to view this content.
    try this and copy towards down

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,000

    Re: count up in Column A until the next non-blank cell in Column C

    TRy


    in D3 and copy down

    =IF($C3="","",SUM(OFFSET($A$2,MATCH(LOOKUP(10^10,$C$2:$C2),$C$2:$C2,0),0,ROWS($1:1)+2-MATCH(LOOKUP(10^10,$C$2:$C2),$C$2:$C2,0)-1)))
    Last edited by JohnTopley; 12-02-2016 at 01:48 AM.

  5. #5
    Registered User
    Join Date
    06-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: count up in Column A until the next non-blank cell in Column C

    JohnTopley: Thank you!! works like a charm...

  6. #6
    Registered User
    Join Date
    06-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: count up in Column A until the next non-blank cell in Column C

    JohnTopley: The formula you provided does work perfectly, but I need help to make a modification. Turns out that numbers less than zero give an incorrect result in column "D". Can the formula be modified to ignore values <0, or treat them as 0?

    For cell D14 in the sample data, the formula:

    =IF($C3="","",SUM(OFFSET($A$2,MATCH(LOOKUP(10^10,$C$2:$C2),$C$2:$C2,0),0,ROWS($1:1)+2-MATCH(LOOKUP(10^10,$C$2:$C2),$C$2:$C2,0)-1)))

    should return 415.

    The negative value in cell A12 changes 415 to -1994.

    Thanks for any help you can offer!

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,000

    Re: count up in Column A until the next non-blank cell in Column C

    Try

    =IF($C3="","",SUMIF(OFFSET($A$2,MATCH(LOOKUP(10^10,$C$2:$C2),$C$2:$C2,0),0,ROWS($1:1)+2-MATCH(LOOKUP(10^10,$C$2:$C2),$C$2:$C2,0)-1),">0"))

  8. #8
    Registered User
    Join Date
    06-12-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: count up in Column A until the next non-blank cell in Column C

    Thanks John!! Once again you're a lifesaver!

+ 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. Count only unique cells in column where another cell in row is not blank
    By accounting2015 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-13-2015, 07:11 PM
  2. Count only unique cells in column where another cell in row is not blank
    By accounting2015 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-12-2015, 06:18 PM
  3. Replies: 3
    Last Post: 07-12-2015, 03:37 PM
  4. [SOLVED] Need to Count Blank cells from active cell going UP the same column
    By EDaig in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2013, 11:22 PM
  5. Replies: 2
    Last Post: 10-04-2012, 03:19 PM
  6. Replies: 4
    Last Post: 05-10-2012, 08:16 PM
  7. Replies: 5
    Last Post: 08-05-2009, 02:43 PM

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