Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 93431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:20:36+00:00 2026-05-10T23:20:36+00:00

I have a spreadsheet with a dataset of a number of transactions, each of

  • 0

I have a spreadsheet with a dataset of a number of transactions, each of which is composed of substeps, each of which has the time that it occurred. There can be a variable number and order of steps.

I’d like to find the duration of each transaction. If I can do this in Excel then great, as it’s already in that format. If there isn’t a straight-forward way to do this in Excel, I’ll load it into a database and do the analysis with SQL. If there is an Excel way round this it’ll save a few hours setup though 🙂

A simplified example of my data is as follows:

TransID, Substep, Time
1, step A, 15:00:00
1, step B, 15:01:00
1, step C, 15:02:00
2, step B, 15:03:00
2, step C, 15:04:00
2, step E, 15:05:00
2, step F, 15:06:00
3, step C, 15:07:00
3, step D, 15:08:00
etc.

I’d like to produce a result set as follows:

TransID, Duration
1, 00:02:00
2, 00:03:00
3, 00:01:00
etc.

My initial try was with an extra column with a formula subtracting end time from start time, but without a repeating number of steps, or the same start and end steps I’m having difficulty seeing how this formula would work.

I’ve also tried creating a pivot table based on this data with ID as the rows and Time as the data. I can change the field settings on the time data to return grouped values such as count or max, but am struggling to see how this can be setup to show max(time) – min(time) for each ID, hence why I’m thinking about heading to SQL. If anyone can point out anything obvious I’m missing though, I’d be very grateful.

As suggested by Hobbo, I’ve now used a pivot table with TransID as the rows and twice added Time as the data. After setting the field settings on the Time to Max on the first and Min on the second, a formula can be added just outside the pivot table to calculate the differences. One thing I’d been overlooking here is that the same value can be added to the data section more than once!

A follow-on problem was that the formula I add is of the form =GETPIVOTDATA(‘Max of Time’,$A$4,’ID’,1)-GETPIVOTDATA(‘Min of Time’,$A$4,’ID’,1), whici doesn’t then increment when copying and pasting. Solutions to this are to either use the pivot table toolbar to turn off GETPIVOTDATA formulae, or rather than clicking on the pivot table when selecting cells in the formula, type the cell references instead (e.g. =H4-G4)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:20:36+00:00Added an answer on May 10, 2026 at 11:20 pm

    You were on the right lines with pivot tables. Drag in TransID as a row field then drag in two copies of Time as data fields in the pivot table; right click on each and specify Min as the summarization function for one and Max for the other. To the right of the pivot table add a formula to calculate the difference.

    alt text http://img296.imageshack.us/img296/5866/pivottableey5.jpg

    ‘Looks good, the only problem I have is that the formula I add is of the the form =GETPIVOTDATA(‘Max of Time, $A$4, ‘ID’, 1) – GETPIVOTDATA(‘Max of Time, $A$4, ‘ID’, 1). When I copy that to the cells below, the 1 doesn’t update to 2, 3 etc so they all show the same time. – Kris Coverdale ‘

    Use this button on the pivot table toolbar to switch GETPIVOTDATA formulae off.

    alt text http://img117.imageshack.us/img117/9937/pivottabletoolbarjn3.jpg

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer 80×25 is actually more typical. BTW. Don't know about BlackBerry,… May 11, 2026 at 11:32 am
  • added an answer OK, looks like I'm answering my own question. The correct… May 11, 2026 at 11:32 am
  • added an answer I have run into this as well. what is 'worse',… May 11, 2026 at 11:32 am

Related Questions

I have a spreadsheet with a dataset of a number of transactions, each of
I have an Excel spreadsheet with a few thousand entries in it. I want
If I have a notebook with three spreadsheet widgets, what is the best way
I have a web app for commercial property management that needs spreadsheet-like functionality for
I have an excel spreadsheet in a format similar to the following... | NAME
I have an Excel spreadsheet containing a list of strings. Each string is made
I have around 25 worksheets in my workbook (Excel spreadsheet). Is there a way
I have two spreadsheets... when one gets modified in a certain way I want
I have a web-service that I will be deploying to dev, staging and production.
I have a .Net desktop application with a TreeView as one of the UI

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.