+ Reply to Thread
Results 1 to 3 of 3

Sum up till next empty and to have another cell with non-empty follow the same range

  1. #1
    Registered User
    Join Date
    03-21-2016
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    3

    Sum up till next empty and to have another cell with non-empty follow the same range

    Hi, I am a junior in excel. Please pardon my question.

    I have a table where numbers are in row - Row C (Targets) and Row D (Actual Sales).

    Row C shows the targeted sales from Jan to Dec (C2:O2)
    Row D shows the actual sales YTD

    Both rows ends with a total. In row D, it sums up till empty. I have adopted this formula from the forum - {=SUM(D3:INDEX(D3:O3,MATCH(TRUE,(D3:O3=""),0)))} and it works. I did this because I wanted Row C's total to sum up in the same range (i.e. if row D total is till empty, i want row C to sum up to the same range instead of summing up all the target numbers till O2).

    How do I then put a formula for row C total to reference to row D's range? Will appreciate the master's help.

    Many thanks,
    Patrick

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Sum up till next empty and to have another cell with non-empty follow the same range

    Hi,

    Welcome to the Forum.

    Try the following formula in O2:

    =SUM(C2:INDEX(C2:N2,1,COUNTIF(C$3:N$3,"<>"&"")))

    drag this down to O3.

    See the attached file.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-21-2016
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    3

    Thumbs up Re: Sum up till next empty and to have another cell with non-empty follow the same range

    Oh goodness, you're brilliant! Thank you very much, cbatrody!

+ 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. [SOLVED] Looping a formula till cell is empty with a button event
    By khhoa in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-09-2015, 02:56 PM
  2. [SOLVED] Search backward in range till empty cell
    By fedude in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-06-2013, 08:00 AM
  3. MACRO to empty a range of cells based on whether specified cell is empty
    By TBJV in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2013, 10:35 PM
  4. [SOLVED] How to autofill any formula till last empty cell
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-16-2013, 08:56 AM
  5. [SOLVED] Looping till empty cell
    By Alexander_Golinsky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-02-2012, 02:11 PM
  6. Fill array till first empty cell.
    By UncleDucc in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-05-2009, 09:56 AM
  7. [SOLVED] Finding next empty empty cell in a range of columns
    By UncleBun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2006, 07:25 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