Question : Oddity in Excel 2007

Cell 1A: "-25.77"
Cell 1B: "-"
Cell 1C: "-26.65"
Cell 1D: "="
Cell 1E: ".88"
Cell 1F: =IF(E1="","",IF(E1=A1-C1,"Correct","Try Again"))

1F is displaying "Try Again"

OK... Here is what happens:

If, instead of .88 is in cell 1E, it is coded =1A-1C, then it says Correct in 1F, though 1E is displaying .88.  On a lark, I expanded it to 30 decimal places (with the equation in 1E rather than the hard coded answer of .88), then it displays:

0.879999999999999000000000000000

And 1F STILL says Correct.  I can reproduce this on any machine which has Excel 2007 installed.  After playing around, if cell 1A has any 25.xx number it gives crazy calculation results, but if it is 25.00 is behaves correctly.  It ONLY does this with the number 25.  What gives?  This is for a math practice sheet I gave my wife to use to study for her Master's degree entry test.  I have always wondered why my financial spreadsheets always seemed off after a while, but this is REALLY weird.

OS is Windows Vista.

Answer : Oddity in Excel 2007

SELECT * FROM Ofertas
WHERE TipoEmpleo = @TipoEmpleo
AND UbicacionEmpleo = @Localidad
AND Fecha > dateadd(d, -@Dias, getdate())

-- returns all records where Fecha is less than @Dias days old
-- getdate() includes the time portion so if you search at Aug 22 12:30, the query is actually

AND Fecha > 'Aug 20 12:30'
Random Solutions  
 
programming4us programming4us