+ Reply to Thread
Results 1 to 5 of 5

Filtering and Find difference

  1. #1
    Registered User
    Join Date
    06-21-2014
    Location
    chennai
    MS-Off Ver
    2010
    Posts
    30

    Filtering and Find difference

    Hi

    I have the data in the above of the sheet. If i filter the Name as A then it will shows the Difference between Feb14 - Jan 14 (subtraction) and Difference Mar 14 - Feb 14.

    If i select the Name B then it will shows the difference of Feb 14 - Jan 14 of B and so on.

    I am attaching the sample for your reference
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Filtering and Find difference

    Im not sure (yet), how to run the calcs based on the middle month, but for the 1st and last month calc, try this...

    =INDEX($C$1:$C$14,MATCH(SUBTOTAL(104,$D$1:$D$14),$D$1:$D$14,0))-INDEX($C$1:$C$14,MATCH(SUBTOTAL(105,$D$1:$D$14),$D$1:$D$14,0))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Filtering and Find difference

    OK no, that wont work, I need to take another look

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Filtering and Find difference

    Maybe like this...

    Add this column header to E1: Difference

    Enter this array formula in E3 and copy down to E13:

    =IF(SUBTOTAL(2,C$2:C3)=1,"",(INDEX(C$2:C$13,MATCH(SUBTOTAL(3,C$2:C2),SUBTOTAL(3,OFFSET(C$2:C$13,,,ROW(C$2:C$13)-ROW(C$2)+1)),0))-INDEX(C$2:C$13,MATCH(SUBTOTAL(3,C$2:C2)+1,SUBTOTAL(3,OFFSET(C$2:C$13,,,ROW(C$2:C$13)-ROW(C$2)+1)),0)))*-1)

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Apply the filter as desired. The difference will be displayed in column E.

    For the grand total use:

    =AGGREGATE(9,5,E3:E13)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Filtering and Find difference

    Pl see attached file.Filter not necessary. Select From dropdown.
    Attached Files Attached Files

+ 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. Difference Between 2 Highest Figures when Filtering
    By jenna_max in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-24-2014, 01:50 AM
  2. "difference greater than..." data filtering
    By Pedro9000 in forum Excel General
    Replies: 2
    Last Post: 07-15-2013, 09:03 AM
  3. Find difference between 2 times after filtering
    By csynic in forum Excel General
    Replies: 0
    Last Post: 07-18-2011, 11:02 PM
  4. Find time difference
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2010, 09:33 AM
  5. FIND DIFFERENCE BETWEEN >50 AND <60
    By Sarath.Ch in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-28-2005, 09:15 PM

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