+ Reply to Thread
Results 1 to 9 of 9

How to Auto Sum with data of irregular rows of data?

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Question How to Auto Sum with data of irregular rows of data?

    I had wanted to do a sum some cost within a worksheet but with irregular rows.

    The sum amount in the sample is I sum it myself. Is there any way to auto sum it after I paste the data into column A to G? The Original file was a template with A to G blank as I will need to copy data from different customers and the columns from H onwards are the data that I will need to find out from each customer.

    There are already existing formula on L till X and where should I put the sum formula?

    Hoped someone can help on this.

    A million thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to Auto Sum with data of irregular rows of data?

    Okay, there may be an easier way depending on how the rows of data are getting there in the first place but ...
    Entering this as an array (CNTRL SHFT ENTER instead of ENTER) in L11 and copying across and down to wherever you need it.
    [FORMULA=SUM(INDEX(L$1:L10,MATCH(2,1/($L$1:$L10="FL"),1)+1):L10)[/FORMULA]See attachment.
    Would that work for you?
    Attached Files Attached Files
    Last edited by ChemistB; 03-05-2014 at 09:23 AM. Reason: Modified Formula for simplicity
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Re: How to Auto Sum with data of irregular rows of data?

    Quote Originally Posted by ChemistB View Post
    Okay, there may be an easier way depending on how the rows of data are getting there in the first place but ...
    Entering this as an array (CNTRL SHFT ENTER instead of ENTER) in L11 and copying across and down to wherever you need it.
    [FORMULA=SUM(INDEX(L$1:L10,MATCH(2,1/($L$1:$L10="FL"),1)+1):L10)[/FORMULA]See attachment.
    Would that work for you?

    Dear ChemistB,

    Thanks for taking an effort to respond. As I had mentioned, from L to X, I already have an existing formula in it and the place there supposed to be blank, depending on how many rows of data I will paste into A to G.

    Please paste the row data on the worksheet onto the checking worksheet and you will understand what I mean.

    My apologies if I have not made myself clear. Therefore, I cannot stop on L10 and uses this formula on that particular row as the row to be sum will not be fixed. This is the part where I do not understand , where you had entered at the end of the formula, :L10, L17, L30, etc.

    I had attached a corrected workbook for your reference.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How to Auto Sum with data of irregular rows of data?

    Okay, I think I am on the right page now. So after you paste data into A7:Gwhatever where G is the Total Row and where you will want your sums. Is that correct.

    You could go to options and Customize Quick Access Bar and add Autosum to your quick access. Or you could modify the formulas in L8 copied down to
    =IF(H8<>"",E8*$L$5,IF(H7<>"",SUM(L7:L$8),""))

  5. #5
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Re: How to Auto Sum with data of irregular rows of data?

    Dear ChemistB,

    Thanks for taking an effort with this "=IF(H8<>"",E8*$L$5,IF(H7<>"",SUM(L7:L$8),"")) " but it won't works.

    I will need the formula to work when there are data between Column A, which reads "Do No" to the row with words "Total". I had made another sample for you to see.

    In this worksheet "Checking", the rows that I will need to sum will be 11, 18 and 26 where these rows will not be fixed, depending on the data available.

    In worksheet "Checking (2)", the rows that I need to sum will become 9, 16, 29 AND 37. The row to be sum will not be consistant.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: How to Auto Sum with data of irregular rows of data?

    With your file in #5, sheet Checking, cell L8:

    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Drag down.
    Quang PT

  7. #7
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Re: How to Auto Sum with data of irregular rows of data?

    Dear bebo021999,

    Thank you for the formula. It works! You are GREAT!!

    I will bring this to do on the actual workbook and hoped it works.

    Can I have 1 more request, on top of this formula, are you able to put in a formula to draw a single top and double bottom line on this sum row?
    Last edited by ec4excel; 03-07-2014 at 08:54 AM.

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: How to Auto Sum with data of irregular rows of data?

    Get it by conditional formating:
    Menu Home/Conditional Formating/New Rule/Use a formula.../Format values where this formula is true: =A8="Total", choose the format for border. Anyway, I could not find the double line format, just single.

  9. #9
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Re: How to Auto Sum with data of irregular rows of data?

    Quote Originally Posted by bebo021999 View Post
    Get it by conditional formating:
    Menu Home/Conditional Formating/New Rule/Use a formula.../Format values where this formula is true: =A8="Total", choose the format for border. Anyway, I could not find the double line format, just single.
    Dear bebo021999, thanks alot. I also cannot find the double bottom line in the conditional formatting. But I think it's already good enough.

    Thank you!!

+ 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. Transposing irregular repetetive data
    By Braedos in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-13-2016, 01:41 AM
  2. [SOLVED] Fitting data into fields out of an irregular list
    By vijaijohn in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-07-2014, 01:43 AM
  3. Converting single column into multiple rows with irregular data
    By longhornpete in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-18-2012, 10:27 AM
  4. Irregular Data Groups In A Column
    By birturkm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2011, 04:36 AM
  5. Sorting irregular data Preferably with VBA
    By daymo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-06-2011, 04:55 PM

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.6.0 RC 1