+ Reply to Thread
Results 1 to 3 of 3

How to set Subtotal formula without calculate duplicate lines

  1. #1
    Registered User
    Join Date
    02-22-2017
    Location
    Malaysia
    MS-Off Ver
    Window 7
    Posts
    2

    How to set Subtotal formula without calculate duplicate lines

    Hi all excel expert,
    Need help as above mentioned in my subject.
    Example I have data below pulled from system which consist of duplication lines with same spend. Any excel formula can help to sum the "weekly spend" by only count once the duplication lines which will return a result of $ 1270.00. But I need a formula of subtotal which the sum only those visible lines with filter by "Name".
    I had tried =SUMPRODUCT(B1:B10/COUNTIF(A1:A10,A1:A10)) but this formula cannot cater the subtotal features and sum value is included hidden line when i filter by "Name".

    Name Weekly Spend
    Betty $60.00
    Calvin $200.00
    Calvin $200.00
    Margaret $100.00
    Michael $100.00
    Peter $150.00
    Rachel $120.00
    Steve $300.00
    Tracy $240.00
    Tracy $240.00

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,901

    Re: How to set Subtotal formula without calculate duplicate lines

    Data in A2:B11, try this ...

    =SUMPRODUCT(SUBTOTAL(9,OFFSET(B1,ROW(B2:B11)-1,))/COUNTIF(A2:A11,A2:A11))

  3. #3
    Registered User
    Join Date
    02-22-2017
    Location
    Malaysia
    MS-Off Ver
    Window 7
    Posts
    2

    Re: How to set Subtotal formula without calculate duplicate lines

    Quote Originally Posted by Phuocam View Post
    Data in A2:B11, try this ...

    =SUMPRODUCT(SUBTOTAL(9,OFFSET(B1,ROW(B2:B11)-1,))/COUNTIF(A2:A11,A2:A11))
    Hi Phuocam,
    Tqvm and your formula is work for my expectation

+ 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 a Formula to Delete Duplicate Lines
    By squallgengar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-18-2016, 04:05 PM
  2. [SOLVED] Formula to Calculate Subtotal - Count of #'s Column While Avoiding Duplicates
    By swoosh1014 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-30-2014, 10:09 AM
  3. [SOLVED] Add new row with VBA two lines above subtotal when I fill in the last row
    By cinnamw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2014, 04:19 PM
  4. Trying to Make My SUMIF formula calculate with the SUBTOTAL funciton
    By maliotta in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-21-2014, 05:32 PM
  5. [SOLVED] formula to Calculate Total of subtotal rows in columns
    By hnpsingh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-06-2013, 08:20 AM
  6. Subtotal - Delete zero Subtotal and prior rows that calculate to that zero Subtotal
    By Whatsherface in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2012, 08:37 PM
  7. Subtotal Lines
    By redmalva in forum Excel General
    Replies: 7
    Last Post: 07-11-2009, 04:44 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