Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2002
    MN, USA
    Thanked 0 Times in 0 Posts

    Formula help (97 SR2)

    I have a list of times (they will be sequential) corresponding to particular workers. I would like to have excel calculate the elapsed time between each worker's job. The workers are all doing different things at the same time as each other. I need the formula to search for the next time stamp for the current worker and then calculate the elapsed time for that job.

    I've got it partially working with a lookup table but am having problems when the formula comes accross the last entry for each worker. When it can't find the worker, I get a #N/A error (I would like it just to leave the elapsed time blank when the last entry for each worker is found). Also, the last elapsed time comes up with 0:00 as the time (should be blank). I think that occurs because the formula must automatically expand to another row.

    I included an example attachment, hopefully this will clarify my explanation.
    Attached Files Attached Files

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Dublin, Ireland, Republic of
    Thanked 0 Times in 0 Posts

    Re: Formula help (97 SR2)

    Try using a test for #N/A in the formula. The following lengthier version of your existing formula should work :

    =IF(ISNA(VLOOKUP(A2,A3:$B$14,2,FALSE)),"",VLOOKUP( A2,A3:$B$14,2,FALSE)-B2)

    Which leaves the cell blank if no match is found.

    Andrew C

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts