+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : Sum if array formula into Subtotal

  1. #1
    Registered User
    Join Date
    05-06-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    1

    Sum if array formula into Subtotal

    I have a Sum if formula that works but it is part of a column that currently has subtotals and many rows that subtotal a portion of those totals. The formula I wrote is great because it uses a reference column to add only the rows I need. Is there a way to transform this into subtotal? This formula was written in AJ942:

    {=SUM(IF(E3:OFFSET(E942,-1,0)=E942,AJ3:OFFSET(AJ942,-1,0)))}

    I have tried this and it did not work.
    {=SUBTOTAL(9,(IF(E3:OFFSET(E942,-1,0)=E942,AJ3:OFFSET(AJ942,-1,0))))}

    I have seen other posts mentioning sumproduct but this does not work for me.

    Thank you!

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sum if array formula into Subtotal

    You don't really need an Array for the non-subtotal version given a standard SUMIF would suffice, eg:

    =SUMIF(E3:OFFSET(E942,-1,0),E942,AJ3:OFFSET(AJ942,-1,0))
    confirmed with Enter

    (though it could be written OFFSET less to remove the Volatility)

    Regards the SUBTOTAL variation:

    =SUMPRODUCT(--(E3:OFFSET(E942,-1,0)=E942),SUBTOTAL(9,OFFSET(AJ3,ROW(AJ3:OFFSET(AJ942,-1,0))-ROW(AJ3),0)))
    confirmed with Enter

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