Excel confusion.
 

Subscribe now and choose from over 30 free gifts worth up to £49 - Plus get £25 to spend in our shop

Excel confusion.

11 Posts
8 Users
0 Reactions
153 Views
Posts: 2304
Full Member
Topic starter
 

Or maybe it's maths confusion.

Anyway, this is the best forum for Excel help, right?

excel

Rows 1-12 are just numbers no functions.
Functions for 15 & 18 are shown.

Why is that false??? 😖


 
Posted : 01/06/2023 11:19 am
Posts: 1294
Free Member
 

Rounding? There's an option somewhere in the toolbar to go through a formula calculation step by step.


 
Posted : 01/06/2023 11:26 am
Posts: 14030
Free Member
 

I'm def no expert but what "=A15" supposed to do?

(Is it supposed to be "+A15"?)


 
Posted : 01/06/2023 11:27 am
Posts: 7750
Full Member
 

My money would be on floating point weirdness.
Use Round on the sum calc.


 
Posted : 01/06/2023 11:29 am
Posts: 0
Free Member
 

Because time to time, excel does these things.

If it helps I get exactly the same using those numbers
Rounding both your terms solves it.

=round(a2-a1,2)=round(a15,2)


 
Posted : 01/06/2023 11:32 am
Posts: 24
Free Member
 

I think it'll be because the floating-point arithmetic is very slightly off - if you format the cell with 25.64 or 0 up to ~15 decimal places, it will be 25.640000000000002 or something, similar for the 0, and this will throw off the exact match criterion. Try (A2-A1)-A15<0.0000001 in cell A18


 
Posted : 01/06/2023 11:35 am
Posts: 0
Free Member
 

On an unrelated note. Does anyone know why one of my work book has ceased to automatically calculate some formula...

Eg

(a3) =A1+a2 (a4) =a1*a2
Update a2, a3 doesn't change, a4 does.
Force a recalculation. No change.
(F2) then return in a3, viola, updated.

Very very annoying in a huge sheet.


 
Posted : 01/06/2023 11:45 am
Posts: 2304
Full Member
Topic starter
 

Ok that makes sense, thanks. Annoying though.

@sharkbait it's comparing, gives a true or false answer.

I often use it just to check a bunch of figures matches the expected total to make sure I haven't missed something out.
Usually something slightly fancier such as:
=IF((A2-A1)=A15, "ok", A2-A1)
(Shows "ok" if it matches, else shows the expected total)


 
Posted : 01/06/2023 11:47 am
Posts: 3322
Full Member
 

Are rows 4-12 input directly or imported? If you add all the numbers to the right of the decimal point (ie 0.46+0.1+0.86 etc), the total ends X.32 not X.64 as displayed to indicate rounding is an issue.


 
Posted : 01/06/2023 12:14 pm
Posts: 0
Free Member
 

the total ends X.32 not X.64 as displayed to indicate rounding is an issue.

Did you miss a "-" there?


 
Posted : 01/06/2023 12:26 pm
Posts: 3322
Full Member
 

several!


 
Posted : 01/06/2023 12:35 pm
Posts: 7474
Free Member
 

You should never compare real numbers like that. You could check for the difference being small eg ABS(x-y)<0.001 but in a digital computer it’s unlikely to be precisely zero.

If working in pounds, using pence instead may be helpful (so everything is in integers).


 
Posted : 01/06/2023 12:36 pm