+ Reply to Thread
Results 1 to 7 of 7

Thread: Sum Between Blanks

  1. #1
    Registered User
    Join Date
    11-26-2008
    Location
    uk
    Posts
    18

    Sum Between Blanks

    Hi,
    I have a worksheet(B) that is populated by another worksheet(A). This data is changing on a daily basis. Groups of data vary in number and are separated by blank cells.

    I want to subtotal between blank cells automatically without using XL's built in subtotal. I do achieve the right results using the subtotal facility however it means i have to reset all the formulas then run the subtotal to update from the previous day.

    This would be ok for me but i have built this system for a novice excel user. I am therefore looking to make this as easy as possible.

    example:

    ---A ---B
    1 bud 6
    2 bob 5
    3 fred 4
    4 TOTAL 15
    5 ted 2
    6 zed 5
    7 ped 1
    8 TOTAL 8

    In the above example rows 4 and 8 are currently blank. Also tomorrow there might be 10 entries before a blank.

    Thanks in Advance
    Last edited by sleazyfish; 10-16-2009 at 07:02 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,202

    Re: Sum Between Blanks

    Probably not best soltuio but I've came with this....

    Book1.xls
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Valued Forum Contributor jj72uk's Avatar
    Join Date
    03-22-2008
    Location
    Essex, England
    MS-Off Ver
    Work - Office 2000, Home - Office 2007E
    Posts
    360

    Re: Sum Between Blanks

    Taking it a step further... if you dont like the #NAME

    Use:

    =IF(ISERROR(RANDBETWEEN(10,100)),"",RANDBETWEEN(10,100))

  4. #4
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,520

    Re: Sum Between Blanks

    Perhaps you could use a Pivot Table based on a dynamic named range, with the named range padded to accomodate extra rows. It would then only be a matter of refreshing the Pivot Table.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  5. #5
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: Sum Between Blanks

    I'm afraid I don't understand your requirements... you say the data is changing every day so you can't use Subtotal feature ... can you elaborate on the workflow. If the data is being overwritten then insertion of formulae isn't going to work either (ie you're looking at VBA).

  6. #6
    Registered User
    Join Date
    11-26-2008
    Location
    uk
    Posts
    18

    Talking Re: Sum Between Blanks

    Thanks for all of your rapid responses.

    zbor, this solution was excellent!. I included a slight modification to eliminate duplicates:

    =IF(AND(C1="",C2=""),"",IF(ISBLANK(C2),SUMIF(D:D,D2,C:C),""))

    I can incorporate the above example into my worksheet. Although I would have preferred the total to be in the same column as the quantity.

    Is this possible without VBA as outlined by DonkeyOte?


  7. #7
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: Sum Between Blanks

    I would have preferred the total to be in the same column as the quantity.

    Is this possible without VBA as outlined by DonkeyOte?
    No (or at least not that I can think of). You would need to add/remove the Subtotal feature and/or use Special Cells methods - either way avoiding VBA would require manual intervention.

    Just to illustrate (manual) special cells method...

    First highlight column B then

    1 - press F5
    2 - select Special
    3 - select Blanks
    4 - press OK
    5 - hold ALT and type =
    6 - hold CTRL and hit ENTER
    Last edited by DonkeyOte; 10-16-2009 at 07:59 AM. Reason: could be wrong - usually am

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0