Formula

B

Boenerge

Hi,
What formula should I use if I want it to look at a specific cell and then
work out the total number between two numbers.
e.g. if cell H6 had 7-4 entered the number 9 would be returned.
Thanks in advance
 
D

Dave Peterson

I'm not sure how you got 9, but your life would be much easier if you used two
separate cells and then subtracted the smaller from the larger (and then added
one???).
 
C

CLR

Maybe this..........
=(LEFT(A1,FIND("-",A1,1)-1)*1)-MID(A1,FIND("-",A1,1)+1,99)*1

Vaya con Dios,
Chuck, CABGx3
 
B

Boenerge

Hi Dave,
Sorry I should have said that the numbers in the cell represent time, 7
o'clock to 4 o'clock, which gives 9 hours.
 
D

Dave Peterson

I'd still put the times in separate cells.

And I'd enter the values as times (7:00:00 and 4:00:00 PM (or 16:00:00)) and
subtract them and format as hh:mm:ss.
 
Top