+ Reply to Thread
Results 1 to 10 of 10

Tweaking SUMPRODUCT formua to include SUBTOTAL

  1. #1
    Forum Contributor
    Join Date
    11-24-2013
    Location
    Huddersfield, England
    MS-Off Ver
    2013
    Posts
    104

    Tweaking SUMPRODUCT formua to include SUBTOTAL

    Hi

    I currently use the SUMPRODUCT formula below and wondered how I can include the SUBTOTAL function so that when I filter the data only the visible cells are returned.

    =SUMPRODUCT(--(A$34:A$2472=A3),--(AA$34:AA$2472=1),--(U$34:U$2472))

    Many thanks

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Tweaking SUMPRODUCT formua to include SUBTOTAL

    Hello Chilli,

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(A$34,ROW(A$34:A$2472)-ROW(A$34),)),--(A$34:A$2472=A3),--(AA$34:AA$2472=1),U$34:U$2472)
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Forum Contributor
    Join Date
    11-24-2013
    Location
    Huddersfield, England
    MS-Off Ver
    2013
    Posts
    104

    Re: Tweaking SUMPRODUCT formua to include SUBTOTAL

    many many thanks.

    Sorry one more if you don't mind

    How do I include it the formula below

    =COUNTIF(A34:A2472,A3)

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

    Re: Tweaking SUMPRODUCT formua to include SUBTOTAL

    =SUMPRODUCT(--(A$34:A$2472=A3),--(AA$34:AA$2472=1),--(U$34:U$2472),--SUBTOTAL(3,OFFSET(A$34,ROW(A$34:A$2472)-MIN(ROW(A$34:A$2472)),)))
    Try this
    Samba

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

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

    Re: Tweaking SUMPRODUCT formua to include SUBTOTAL

    Countif(a3,a34:a2472)
    can include like this

  6. #6
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Tweaking SUMPRODUCT formua to include SUBTOTAL

    Quote Originally Posted by Haseeb A View Post
    Hello Chilli,

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(A$34,ROW(A$34:A$2472)-ROW(A$34),)),--(A$34:A$2472=A3),--(AA$34:AA$2472=1),U$34:U$2472)
    Quote Originally Posted by chilli76 View Post
    .....How do I include it the formula below

    =COUNTIF(A34:A2472,A3)
    Isn't in the formula? --(A$34:A$2472=A3)

  7. #7
    Forum Contributor
    Join Date
    11-24-2013
    Location
    Huddersfield, England
    MS-Off Ver
    2013
    Posts
    104

    Re: Tweaking SUMPRODUCT formua to include SUBTOTAL

    Not sure I understand

    =COUNTIF(A34:A2472,A3)

    This is a separate formula that I use to count the row identifiers I have in column A to match the identifier in Cell A3. Just wanted to do the same and count these only if they remain after filtering.

    Thanks

  8. #8
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Tweaking SUMPRODUCT formua to include SUBTOTAL

    OK Chilli. My bad.

    The answer is already in your original formula, just add SUBTOTAL in the front & remove last two criteria.

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(A$34,ROW(A$34:A$2472)-ROW(A$34),)),--(A$34:A$2472=A3))

  9. #9
    Forum Contributor
    Join Date
    11-24-2013
    Location
    Huddersfield, England
    MS-Off Ver
    2013
    Posts
    104

    Re: Tweaking SUMPRODUCT formua to include SUBTOTAL

    Ah yes, I see. Thanks for that, works a treat

  10. #10
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Tweaking SUMPRODUCT formua to include SUBTOTAL

    Quote Originally Posted by chilli76 View Post
    ...works a treat...
    This is the final word we all expect. Thank you Chilli for the feedback.

+ 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. need subtotal to also include the matching data in subtotal line
    By baby_kay_2003 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-15-2014, 12:43 AM
  2. [SOLVED] Formula SUMPRODUCT works, now needs some tweaking, to True/False identify TEXT
    By steve08087 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-29-2013, 06:20 PM
  3. [SOLVED] subtotal data and include other info from row
    By acp in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 01-28-2013, 02:57 PM
  4. Subtotal range of values that include errors
    By 1eyedjack in forum Excel General
    Replies: 3
    Last Post: 06-29-2011, 10:39 AM
  5. [SOLVED] How do I include filtered out numbers in a SUBTOTAL?
    By CMDMHHS in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-24-2006, 10:40 AM
  6. [SOLVED] How do you subtotal but not include the word total in the cells?
    By Kiesha in forum Excel General
    Replies: 2
    Last Post: 04-20-2006, 06:45 PM
  7. Include Subtotal in SumIf
    By Bonobo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-27-2005, 08:05 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