View Single Post
  #4   Report Post  
Troi-Xanh
 
Posts: n/a
Default

It's weird that after doing something else, I came back to the worksheet and
there is the CORRECT answers. (BTW, the numbers are NEVER '160' and '151' but
always '162' and '153').

This morning (4/14) I use different number "171" which either as direct
input or from a calculation "minutes between to times" =(E1-E2)*1440, when
E1=4:45 and E2=1:54. the results are :

Quarter = 3
Dime = 1 --- supposedly 2
Nickel = 1 --- supposedly 0

LEFTOVER= 9 (minutes, using formula 'B1-((D2*A2)+(D3*A3)+(D4*A4))'

'Working on something elso them coming back' doesn't fix the problem! I
cannot make sense of it. How can I get the correct answer for the first
time). Thanks for all the help.


"Adam" wrote:

I assume that now you get the correct figures.
The reason for you getting 0 for the nickels is of course because the
remainder from 3 quarters and one dime is only 7 when using 160 minutes.

The same of course applies to the second query.

"Troi-Xanh" skrev:

The number is "162" and "153" (instead of 160 and 151)

Sorry for the mixed-ups

"Troi-Xanh" wrote:

I try to create formulas to calculate parking meter 'feeding' combination and
get the INTERGER (=int) function problem:

DATA: and FORMULA:
Cell 'B1' is the number of minutes :
45 minutes for a Quarter (A2) =INT(B1/A2)
18 minutes for a Dime (A3) =INT((B1-(B2*A2))/A3)
9 minutes for a Nickel (A4) =INT((B1-((B2*A2)+(B3*A3)))/A4)

With "160 minutes" (@ B1) I get correct calculations for Quarter (3) and
Dime (1) but REZO for Nickel (supposedly= 1). If I remove the =INT in formula
for Nickel, I get the correct answer '1' (but I also get the decimal in other
cases!)

With "151 minutes" (@ B1) I get correct for Quarter (3), but REZO for Dime
(supposedly 1) and ONE for Nickel (supposedly 0). If I remove the 'INT'
formula, I get '0.888889' for Dime AND 2 (TWO) for Nickel!

Is that weird? Any explanation is deeply appreciated.