+ Reply to Thread
Results 1 to 7 of 7

sum until hitting blank cell

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    Hong Kong HKG
    MS-Off Ver
    Excel 2007
    Posts
    5

    sum until hitting blank cell

    ScreenShot001.png

    Hello there

    This is a report that I am doing to check the sales of each product.

    In the image there are three products under C:Item No. For each product, I need to cross check whether the sum of K:Quantity matches M:Received, e.g. sum of K2:K4=M5, K6:K16=M17, K18:K21=M22.

    In short, I would like to find a formula that adds up the values under K until it hits a blank cell, and starts over with the one underneath.

    I tried to find something similar in the forum but cant seem to get anything similar.

    I would appreciate if anyone has any idea how I can get this done easily.

    Thank you!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: sum until hitting blank cell

    In M2 cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag it down...


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: sum until hitting blank cell

    In M2 use

    Please Login or Register  to view this content.
    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: sum until hitting blank cell

    hi pingus, welcome to the forum. i suggest you upload an sample Excel file next time instead of a picture. an alternative if your data starts from row 2:
    =IF(K2<>"","",SUMIF($C$2:C2,C2,$K$2:K2))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: sum until hitting blank cell

    pl see the attached file with formula in M column.
    Attached Files Attached Files

  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: sum until hitting blank cell

    @kvsrinivasamurthy, M2: =IF(K2="",SUM(K1:INDEX($K1:K$2,MAX(IF($K1:K$2="",ROW($K1:K$2)-1,"")))),"") CSE


    Try to use the one below. It looks shorter and more elegant without array enter

    M2: =IF(K2="",SUM(K$2:K2)-SUM(M$1:M1),"")

    Normally Enter

  7. #7
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: sum until hitting blank cell

    @pinguis. Base on your sample, the formula can be really simple.

    M2: =IF(K2="",SUMIF(C:C,C2,K:K),"")

    copy down as far as needed

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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