+ Reply to Thread
Results 1 to 10 of 10

Sum consecutive cells in excel using the upper and lower text limit as criteria

  1. #1
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    Sum consecutive cells in excel using the upper and lower text limit as criteria

    Hi,

    I'm hoping someone could help me out. I need a formula under column C in which it will automatically sum up the values on cell B using A as criteria.

    What I think is, the formula should use the names as limit, like for example, if the formula detects that the next cell is a different text, it will then sum up values on column B in where the value in column A is the same until the text differs again.

    Hope that makes sense.

    The thing is I just want it to look exactly as how it is on the sheet but without me having had to manually sum up the amounts.

    I hope this is possible. Thank you so much!
    Attached Files Attached Files

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Sum consecutive cells in excel using the upper and lower text limit as criteria

    Try

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


    Drag down
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Sum consecutive cells in excel using the upper and lower text limit as criteria

    Use:
    =SUMIF(I:I,I3,J:J)

    or, to get your exact expected results:
    =IF(SUMIF(I:I,I3,J:J)=SUMIF($I$3:I3,$I3,J$3:J3),SUMIF(I:I,I3,J:J),"")
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    Re: Sum consecutive cells in excel using the upper and lower text limit as criteria

    Hi Glenn and Shukla,

    Thank you for responding, I think I uploaded an incorrect file. Please see attached updated one. Glenn's formula works if the names would not repeat somewhere below, however the file I'm working on would repeat the names across.

    Sorry of this and thank you so much!
    Attached Files Attached Files

  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 consecutive cells in excel using the upper and lower text limit as criteria

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

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Sum consecutive cells in excel using the upper and lower text limit as criteria

    c2=IF(A2=A3,"",SUMIF(A$2:A2,A2,B$2:B2)-SUMIF(A$1:A1,A1,C$1:C1))
    Try this and copy towards down
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  7. #7
    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 consecutive cells in excel using the upper and lower text limit as criteria

    Shadowing the expected output in C this proposes a helper column in D. D2 and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In E2 and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 09-18-2018 at 03:28 AM.

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Sum consecutive cells in excel using the upper and lower text limit as criteria

    or try

    C2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by shukla.ankur281190; 09-18-2018 at 03:32 AM. Reason: Removed Iferror function

  9. #9
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Sum consecutive cells in excel using the upper and lower text limit as criteria

    The below should suffice:

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


    The above simply uses the logic that the answer is the total of Column B {at given row} less any previously calculated sub total(s) in Column C {up to and including prior row}.

    Answers mirror expected, and all pretty straightforward.

  10. #10
    Forum Contributor
    Join Date
    09-19-2017
    Location
    Taguig City, Philippines
    MS-Off Ver
    Microsoft Excel 2016
    Posts
    120

    Re: Sum consecutive cells in excel using the upper and lower text limit as criteria

    Wow, thank you all for the responses! I guess the last formula is straighforward, hence I'd use it. Thank you all!
    Last edited by MyStix01; 09-18-2018 at 08:27 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. [SOLVED] upper and lower limit index search
    By johnmacs5 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2016, 05:46 PM
  2. Copy and insert row below within fixed upper limit and dynamic lower limit
    By droffel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2015, 08:57 PM
  3. Finding a value within an upper and lower limit
    By bergii in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2014, 05:05 PM
  4. [SOLVED] I need to creat a IF formula that has a upper and lower limit.
    By jnelson83 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-11-2013, 12:11 PM
  5. [SOLVED] find the lower and upper limit if data is in between on that limit
    By clangeles in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-27-2012, 06:18 AM
  6. Separate consecutive lower then upper characters
    By tone640 in forum Excel General
    Replies: 4
    Last Post: 10-13-2011, 09:39 AM
  7. Upper and lower limit lines on chart
    By Joeschmo5 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-08-2009, 10:09 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