+ Reply to Thread
Results 1 to 4 of 4

Subtract previous value in same column

Hybrid View

  1. #1
    Registered User
    Join Date
    06-29-2017
    Location
    Namibia
    MS-Off Ver
    2013
    Posts
    2

    Subtract previous value in same column

    Hi there,

    Please see attached data sheet. It contains production readings of various brick machines. The readings are continuous (the counters on the machines can’t be reset). What I need is a formula (in Column D) that can subtract the previous reading (value) of the same machine - in order to get the production total for the day (for the specific machine). The best I could do is a formula that can only subtracts the last entered value from the first entered value in the column (as can be seen on the sheet).

    Hope someone can help.

    Henco
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Subtract previous value in same column

    In E10, copied down, use this:

    =C10-LOOKUP(10^300,$C$2:$C9/($B$2:$B9=B10))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Subtract previous value in same column

    D10 =C10-INDEX($C$2:C9,MAX(IF($B$2:$B9=B10,ROW($B$1:B8)))) as array formula and pull dwn

  4. #4
    Registered User
    Join Date
    06-29-2017
    Location
    Namibia
    MS-Off Ver
    2013
    Posts
    2

    Re: Subtract previous value in same column

    Wow! Thanks Glenn and Russia, both works beautifully. I just realized how much I still have to learn.

    Thanks again.

    Henco

+ 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. Replies: 1
    Last Post: 12-28-2015, 08:43 AM
  2. Replies: 7
    Last Post: 11-13-2014, 04:46 PM
  3. running total subtract % of previous months
    By amartino44 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-17-2013, 01:42 PM
  4. VBA code to Subtract values in Column F with Column E if found non-blank
    By hydz1213 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-05-2013, 04:34 AM
  5. [SOLVED] Subtract next cell from the previous cell in a column for a range of values
    By frhling in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 12-12-2012, 10:34 AM
  6. Insert column and fill column upto where data is in previous column
    By aka189 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-24-2012, 06:07 AM
  7. [SOLVED] Subtract # of days from date, but if not sat, goto previous sat?
    By Fernando in forum Excel General
    Replies: 3
    Last Post: 05-01-2006, 03:57 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