View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
smoss smoss is offline
external usenet poster
 
Posts: 4
Default @Need help with a formula

Answer is in D6

D6 cell format is h:mm

I am not sure what you are asking about in the empty string...if there is no
input in D5 then I want it to not calculate that, but still calculate C6 and
C5

I tried your formula and got a ######## error
--
smoss


"David Biddulph" wrote:

I assume that in the cases where you're asking D6 to return an empty string,
you still want an empty string?

Do you want the answer to be in D6 or in another cell?

If you want the answer in another cell, use the formula =IF(D6="","",D6-D5)

If you want the answer in D6, change your existing formula from
=IF(AND(ISNUMBER(C6),ISNUMBER(C5)),IF(IF(C6-C5$N$3,C6-C5-$H$3,IF(C6-C50,C6-C5,0))=0,"",IF(C6-C5$N$3,C6-C5-$H$3,IF(C6-C50,C6-C5,0))),"")
to
=IF(AND(ISNUMBER(C6),ISNUMBER(C5)),IF(IF(C6-C5$N$3,C6-C5-$H$3,IF(C6-C50,C6-C5,0))=0,"",IF(C6-C5$N$3,C6-C5-$H$3,IF(C6-C50,C6-C5,0))-D5),"")

But (in either case) if the numbers in C6 and C5 are Excel times (which are
measured in days) and if your D5 is in hours, then you'll need to convert
(such as replacing
-D5 by
-D5/24).
--
David Biddulph

"smoss" wrote in message
...
Sorry if in the wrong category...........

My Formula in D6
=IF(AND(ISNUMBER(C6),ISNUMBER(C5)),IF(IF(C6-C5$N$3,C6-C5-$H$3,IF(C6-C50,C6-C5,0))=0,"",IF(C6-C5$N$3,C6-C5-$H$3,IF(C6-C50,C6-C5,0))),"")

C5 = Employee start time
C6 = Employee stop time
D5 = 1 or .5 for lunch
I would like the number that I enter into D5 (either 1 or .5) to be
subtracted from D6

Thanks In Advance

--
smoss