# forumla for difference

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

#### roebkk

I have two columns with times in each in seconds. I need a formula for the difference between the two columns, which is easy. The part that gets me is that sometimes the first column is the higher number and sometimes the 2nd column is the higher number. I do not want negatives to show up, simply the difference in seconds between the columns regardless of which column has a higher time. (These are two races and I am looking for the most consistant runner with the closest time.)

#### Zack Barresse

Hi there, welcome to the board!

=Max(A1:B1)-Min(A1:B1)

??

#### roebkk

Thanks but it ends up always answering 0?

#### Zack Barresse

It's not zero, it's a fraction of an integer. Dates and times are different in Excel. One complete day (24 hours) is 1 whole number. So 12 hours will be 0.5 as a numerical value. You just need to either show more decimal places or format as time.

#### roebkk

Oops! I forgot to update the cell address when I copied/pasted. I think this will work! Thanks.

#### slurpee55

Zack, wouldn't =ABS(A1-B1) work just as well?

#### Zack Barresse

Yes, yes it would.

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

As Seen On