Thread: INT and MOD
View Single Post
  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

It would still be easier if you gave us an example of the data in A1, I6,
and all the rest where you get the problem.

--
HTH

Bob Phillips

"Big Rick" wrote in message
...
Hello.
Before I start, I'm afraid I made a slight mistake in my explanation.

All cell references refer to holiday entitlement, holidays taken,

additional
hours worked. etc. (as each of the cells references are the results of
formulas themselves, I'm sure it would sound double dutch if I tried
explaining each one.)

The problem and were I made my mistake is that if I used all my holidays

and
both cells equalled zero and then I took half a days holiday, I would owe

4
hours.
The result of each formula is -1 for the first. 4 for the second.
I would like the result to be 0 for the first. -4 for the second.

Hoping you can understand this now.
--
Big Rick


"Bob Phillips" wrote:

Give us some sample data otherwise it takes a lot of effort to create

data
that fits that circumstance.

--
HTH

Bob Phillips

"Big Rick" wrote in message
...
Hello, one and all.

I have two cell formulas as follows.
=INT($I$6+A1+$Z$6+$A$13-$A$17-$A$21-$Y$7)
=MOD($I$6+A1+$Z$6+$A$13-$A$17-$A$21-$Y$7,1)*($S$4/5)
The first gives me the number of whole days holiday available.
The second gives me the number of hours left (up to 8) (S4 can be

either
37.50 or 40)

Please can you tell me why, that if the number of holidays left was

was
1/2
a day,(0.50) does the result give -1 for the first formula and 4 for

the
second formula. Surely the INT of 0.50 should be 0.
Your help is and always has been greatly appreciated.

Thanking you in anticipation.
--
Big Rick