+ Reply to Thread
Results 1 to 6 of 6

Sum until next non blank cell in another column

Hybrid View

  1. #1
    Registered User
    Join Date
    02-11-2015
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    9

    Sum until next non blank cell in another column

    Hi,

    Need a little help on the formula to sum amount until non blank cell of another column. e.g. to sum value in column B starting from the first cell that has value in column A until all blank cell below and stop at before the next cell with value. Attached the example.

    Any help is much appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Sum until next non blank cell in another column

    Put in C1 and copied down:

    =SUMPRODUCT((LOOKUP(ROW($A$1:$A$16),(1/($A$1:$A$16<>"")*ROW($A$1:$A$16)),$A$1:$A$16)=A1)*$B$1:$B$16)
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-11-2015
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    9

    Re: Sum until next non blank cell in another column

    Many thanks, Azumi. It works.

  4. #4
    Registered User
    Join Date
    02-28-2020
    Location
    Indonesia
    MS-Off Ver
    Office 2019
    Posts
    1

    Re: Sum until next non blank cell in another column

    awesome, this is what i'm looking for..
    thank you very much buddy..

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Sum until next non blank cell in another column

    C2=IF(A2<>"",A2,C1) and drag down.

    After that a sumformula or a pivot table.

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2503 and WPS V2024(12.1.0.18543)
    Posts
    3,952

    Re: Sum until next non blank cell in another column

    Cell C1 formula , Drag down

    Formula: copy to clipboard
    =IF(A1="","",SUM(B1:B$20)-SUM(C2:C$20))


    Please watch this animation teaching file FILE name as S21.gif
    After the file is downloaded and decompressed, you can use the left mouse button to click twice to watch the teaching file (video) or open it with explorer.
    Attached Files Attached Files
    Last edited by wk9128; 06-15-2022 at 08:19 PM.

+ 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. Replies: 1
    Last Post: 02-26-2019, 01:47 AM
  2. Replies: 16
    Last Post: 07-10-2018, 06:38 PM
  3. Clear column D cell based on a blank formulated column A cell
    By jnbroek in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-18-2013, 11:05 AM
  4. [SOLVED] If Cell in column B blank then various cell are blank - vba tweek needed!!!
    By skyping in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-24-2013, 12:24 PM
  5. Replies: 0
    Last Post: 03-05-2013, 09:22 AM
  6. Find first blank cell in column if rightmost cell is non blank
    By Mothman in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-19-2010, 02:22 AM
  7. insert a blank column if a cell is blank...how?
    By bego in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2007, 03:04 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