Results 1 to 2 of 2
  1. #1
    bigspace55 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    11

    Subtracting in the same column for multiple IDs

    Hello! I am having some trouble figuring out how to subtract data from the same column in one table while having multiple ID numbers to do it for within that table. Everything I have found online about this has been similar but none of them had multiple ID numbers to do it for. For instance, the other peoples problems were like this...

    Date Hour Total_MWh
    1/1/2000 1 182.789
    1/1/2000 2 182.996
    1/1/2000 3 183.006
    1/1/2000 4 182.981


    And from the above problem they wanted to figure out the difference between the total wmh in hour 4 and hour 3. My problem is similar but with an added twist. Here is my problem...


    Date Time Card Number Mileage
    1/1/2000 8:00 20 65000
    1/1/2000 10:21 48 45000
    1/1/2000 10:21 32 18269
    1/1/2000 2:46 20 65160




    And for my above problem i want to figure out the difference in mileage from the previous time recorded as above but the card numbers have to be equal to one another so that it doesn't subtract mileage from card 20 and mileage from card 32 or 48...I need it to only subtract card 20 from the previous card 20 input and so on. Any advice would be much appreciated. Thanks

  2. #2
    bigspace55 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    11
    I figured it out

Please reply to this thread with any new information or opinions.

Similar Threads

  1. vba > subtracting time
    By metokushika in forum Access
    Replies: 2
    Last Post: 12-09-2014, 09:17 PM
  2. Adding/Subtracting
    By JayX in forum Programming
    Replies: 3
    Last Post: 12-15-2011, 03:13 PM
  3. Adding/Subtracting
    By JayX in forum Access
    Replies: 1
    Last Post: 12-15-2011, 01:47 PM
  4. Multiple column select
    By oljees in forum Queries
    Replies: 2
    Last Post: 07-28-2011, 08:32 PM
  5. from excel - multiple column to one
    By Eitas in forum Import/Export Data
    Replies: 1
    Last Post: 05-12-2011, 02:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums