+ Reply to Thread
Results 1 to 7 of 7

Calculating Difference based on following value

  1. #1
    Forum Contributor
    Join Date
    06-01-2012
    Location
    va
    MS-Off Ver
    2007
    Posts
    163

    Calculating Difference based on following value

    I need help making a macro that will calculate the difference between two activities based on the following activity. I have attached a sample workbook.

    So, I want to be able to calculate the time difference between cells from column G when the New Status is "complete" and the one underneath it is either "Available, transit, up". I know the last two aren't on the spreadsheet, but they are in the master sheet.

    Is this possible? I would like the values to be pasted next to the "complete" value in column J. I have included a time calculation formula if needed.

    Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Calculating Difference based on following value

    Am not able to understand your question. Can you please try and explain for which range we need to calculate the time and how is the range selected?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    06-01-2012
    Location
    va
    MS-Off Ver
    2007
    Posts
    163

    Re: Calculating Difference based on following value

    Sure, sorry about that.

    I wouldl like to calculate the time difference when there is a change in Column I from the "Complete" status to "Available, transit, up". The last two aren't in this spreadsheet, but they are in my master spreadsheet.

    So one example would be that in row 22 in column "J" you would have a value of 552:08:24, since the status changes from "Complete" to Available (the bottom status).

    There would also have been a value in row 15, but it is a negative so I don't want anything to show up.

    I hope this helps.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Calculating Difference based on following value

    How would you arrive at 552:08:24? Which cells should be included in the calculation?

  5. #5
    Forum Contributor
    Join Date
    06-01-2012
    Location
    va
    MS-Off Ver
    2007
    Posts
    163

    Re: Calculating Difference based on following value

    Sorry the calculation in column J should be "23:00:21" I don't know why it is multiplying it by 24,

    So you would be subtracting cells G23-G22, since I would like to measure the time it takes to go from "Complete" to "Available" in column I.

  6. #6
    Forum Contributor
    Join Date
    06-01-2012
    Location
    va
    MS-Off Ver
    2007
    Posts
    163

    Re: Calculating Difference based on following value

    Would someone else possibly be able to help me with this?

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Calculating Difference based on following value

    I will look into this.

+ 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] Calculating the Difference in Time
    By forexcellence13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2013, 10:56 PM
  2. Calculating difference between two dates
    By kwing in forum Excel General
    Replies: 9
    Last Post: 05-25-2010, 11:35 AM
  3. Calculating difference between two times
    By Jaycatt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2006, 03:05 PM
  4. Calculating Time difference based on a condition
    By sonnethg in forum Excel General
    Replies: 4
    Last Post: 10-11-2005, 04:25 PM
  5. [SOLVED] calculating the difference between 2 numbers
    By Darran in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 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