Help With a Excel 97 or 2002 Formula

M

martin.g.g

I need to enter a formula in a cell that that has to be multi function
It needs to be able to work out the difference between two time
entered in two cell and show the result in hours and minutes (no
time). It also need to be able to recognise the letter 'H' displayed i
the same cells instead of the time and display the time as '0:00'
Finally it needs to also be able to recognise the letter 'S' displaye
the same '0:00'. I belive this will require 3 fomulas and some kind o
linking Can this be done and can any one point me in the righ
direction to help, Better still forward me and example that I can pla
with.

Hopfully

Marti
 
P

Peo Sjoblom

One possible way

=IF(OR(A1="S",A1="H",B1="S",B1="H"),"00:00",HOUR(MOD(B1-A1,1))&" Hour(s) and
"&MINUTE(MOD(B1-A1,1))&" Minute(s)")

where A1 holds the start time and B1 the end time when a time is entered
else the letters
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top