+ Reply to Thread
Results 1 to 11 of 11

sum between blank cells

  1. #1
    Registered User
    Join Date
    04-23-2017
    Location
    LONDON, ENGLAND
    MS-Off Ver
    PRO PLUS 2016
    Posts
    12

    sum between blank cells

    I am building a inventory management worksheet. I receive packages which contain sub material of different weights. I am trying to make a sheet where i enter the sub weights of the package and it calculate the total from the first till the last entry.

    I found this dynamic function to calculate sum between blank cells. the function only displays the result on the last cell before the blank cell but is applied to the entire column.As it shows the sum in the last cell i am not able to use the result for a sumifs function to generate a total. I want the sum to be showed in the first cell of each entry next to samsung and mts. Can someone help me with it?

    formula =IFERROR(IF(ISBLANK(F8),SUMPRODUCT(INDEX(F:F,LOOKUP(2,1/ISBLANK(F$1:F7),ROW(F$1:F7))):F7),""),"")

    2017-04-23 (2).png

    right now it shows the sum at E16 & E21
    i want it to show the sum at E7 & E18

    thanks in advance
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by coolmob; 04-23-2017 at 01:31 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: sum between blank cells

    Attaching a sample workbook enables others to work on your problem:

    To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and click "manage attachments" to open the upload window.



    To add a file to a post

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: sum between blank cells

    coolmob welcome to the forum.

    Edited: Came up with shorter formula.

    This is the best I can come up with. It works with the example provided, (but .....?) It is an array formula entered in E7 and filled down. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 04-23-2017 at 01:39 PM.
    Dave

  4. #4
    Registered User
    Join Date
    04-23-2017
    Location
    LONDON, ENGLAND
    MS-Off Ver
    PRO PLUS 2016
    Posts
    12

    Re: sum between blank cells

    works perfectly!

    thanks a ton

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: sum between blank cells

    You're welcome. Thanks for the feedback.

  6. #6
    Registered User
    Join Date
    04-23-2017
    Location
    LONDON, ENGLAND
    MS-Off Ver
    PRO PLUS 2016
    Posts
    12

    Re: sum between blank cells

    Quote Originally Posted by FlameRetired View Post
    coolmob welcome to the forum.

    Edited: Came up with shorter formula.

    This is the best I can come up with. It works with the example provided, (but .....?) It is an array formula entered in E7 and filled down. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    your earlier formula worked perfectly.
    working formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    the edited one you posted does not count after 4 entries. please fix this formula

    thanks
    Last edited by coolmob; 04-23-2017 at 02:03 PM.

  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,206

    Re: sum between blank cells

    FYI:

    Alternative using "helper"

    in H7 and copy down

    =IF(C7<>"",MAX(H6)+1,H6)

    in E7

    =IF($C7="","",SUMIF($H$7:$H$22,$H7,$F$7:$F$22))

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: sum between blank cells

    I thought about this after you marked it solved, and I haven't looked at JohnTopley's solution, yet.

    I referenced the incorrect variable for the K_value of SMALL in the earlier posts. My apologies.

    The first formula should be: (note the offset in the rows of COUNTIF($F$6:F6,""))

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


    The edited formula should still work with that same correction.

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


    I can't tell which formula you want fixed.
    Last edited by FlameRetired; 04-23-2017 at 02:55 PM.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: sum between blank cells

    Go with John's approach. It's much simpler and easier to maintain.

  10. #10
    Registered User
    Join Date
    04-23-2017
    Location
    LONDON, ENGLAND
    MS-Off Ver
    PRO PLUS 2016
    Posts
    12

    Re: sum between blank cells

    i want to sum total of entries in F till a blank cell to be displayed in E when there is a entry in C.

    but you are using H in your formula, can you explain how to use your method

    thanks!

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: sum between blank cells

    The reference to column H in JohnTopley's formula is to the helper column. It is the range for criteria to evaluate and the criteria itself. They are needed for the SUMIF function to conditionally add numbers in column F.

    Those conditions referencing column C are in the helper column formula.

+ 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 blank cells in a range and contiguous blank cells also as single cells! Tricky One!
    By SebastianColombia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2015, 02:32 PM
  2. [SOLVED] Macro to fill blank cells in column A based on non-blank cells
    By ktalamantez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2014, 02:47 PM
  3. Ignore blank cells and truly blank cells in named range?
    By hschillig in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-13-2014, 02:56 PM
  4. [SOLVED] Delete special blank cells not recognising blank cells
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-04-2013, 03:54 AM
  5. Replies: 5
    Last Post: 08-26-2013, 06:26 PM
  6. How can I make a macro ignore blank cells? - Blank Cells have formulas
    By mz1161 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2013, 08:54 AM
  7. Advanced filter with blank cells / Dynamic named range with blank cells
    By Jason_2112 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-15-2010, 12: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