+ Reply to Thread
Results 1 to 3 of 3

How to calculate difference from previous row in filtered table

  1. #1
    Registered User
    Join Date
    06-19-2023
    Location
    Manchester
    MS-Off Ver
    2016
    Posts
    1

    Post How to calculate difference from previous row in filtered table

    Hi All,

    Need someone to shed some light.

    Attached image 1 the raw data, where Column A shows different machine ID, Column B shows different date and Column C is my specification respectively.

    I'm looking up for a formula in Excel, which can calculate the difference from previous successive row in filtered table, under same condition/criteria (eg. same machine ID and same station date_trackouttime). For example, I filtered with machine ID to BG3 with station date 11/6/2023, track out time sorted in ascending order as in image 2 below, and the difference from its previous successive row will display in Column D. The remaining unfiltered data (other machine ID in same date) should also proceed to display the differences accordingly under the same condition

    I know pivot table > shows value as difference from previous will do the same thing, but i need it to be done in raw data table for further analysis.

    Thank you.
    rawdata2.pngrawdata1.png

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: How to calculate difference from previous row in filtered table

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: How to calculate difference from previous row in filtered table

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. As you are new here, I shall do it for you this time: https://www.mrexcel.com/board/thread...table.1239591/)

+ 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. [SOLVED] Calculate % difference between current & previous month sales
    By Keshy85 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-21-2022, 08:59 PM
  2. Row difference of current row in a filtered excel table relative to top row on display
    By Gaurav Kothari in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2020, 01:34 AM
  3. Find value and calculate difference to a previous cell
    By elMatador in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2017, 03:40 PM
  4. Pivot table - showing difference from previous month
    By sharp_shooter in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-16-2017, 11:26 AM
  5. [SOLVED] How to calculate difference in pivot table?
    By Frost32 in forum Excel General
    Replies: 3
    Last Post: 04-07-2017, 11:41 AM
  6. [SOLVED] Dynamic formula to calculate the difference between current and previous month
    By kay007 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-19-2015, 11:19 AM
  7. Replies: 0
    Last Post: 02-25-2015, 01:02 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