Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a macro that I want to enhance with formula subtotals. My present macro has subtotals in several columns which are derived using the basic excel data>subtotal function. I now need to use these subtotals to create additional subtotals in 2 subsequent columns ie: p=sum(o/m) and q=sum(o/k). I presently add these formulas in manually each day because the data changes daily and therefore subtotals are not always on the same row but will always be in the same column. Anyone know how to do this?

    Thanks
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I'm sorry, I don't see any formulas in the workbook that you attached and I don't understand what you want to accomplish.

  3. #3
    New Lounger
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='773694' date='04-May-2009 19:58']I'm sorry, I don't see any formulas in the workbook that you attached and I don't understand what you want to accomplish.[/quote]


    Let me try again....I have totals in several columns [columns A, C, and E) these were derived using data subtotals. I now need to add in formulas to columns F and G. Column F formula is =sum(order contribution/net order value) and column G formula is =sum(order contribution/order kgs) these 2 values need to fall on the same rows as the other subtotals, those subtotals that I am using in the formulas. Each day the data changes so today subtotals may be on row 10 and 12 but tomorrow the subtotals may be on rows 15 and 24 and so forth. I want to automate these additional formulas with a macro.

    Thanks
    Attached Files Attached Files

  4. #4
    2 Star Lounger
    Join Date
    Aug 2004
    Posts
    123
    Thanks
    0
    Thanked 1 Time in 1 Post
    ........ I now need to add in formulas to columns F and G. Column F formula is =sum(order contribution/net order value) and column G formula is =sum(order contribution/order kgs) .............
    1] F2 :

    =ROUND(SUM(E2:INDEX(E:E,MATCH(9.9E+307,E:E)))/SUM(C2:INDEX(C:C,MATCH(9.9E+307,C:C))),2)

    2] G2 :

    =ROUND(SUM(E2:INDEX(E:E,MATCH(9.9E+307,E:E)))/SUM(A2:INDEX(A:A,MATCH(9.9E+307,A:A))),2)

    Regards
    Bosco

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •