Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 15 total
Thread Rounding
Sun, Apr 10 2011 4:32 PMPermanent Link

Rita Tipton

I thought I had rounding sorted until this one.
The green numbers add up to £116.55
£47.16      is   £47.157  so ok it rounds to £47.16
£41.16     is    £41.156  as does this  to    £41.16
£24.63     is    £24.630 and does not need to round

however the 3 amounts don't add up they are a penny
short. I think I have tried everyway possible to get that

Total to   = £116.56

I'm stumped any ideas please.

Rita



Attachments: ROUND.JPG
Sun, Apr 10 2011 5:16 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Rita,

Instead of adding the values, add the rounded values:
round(v1,2) + round(v2,2) + round(v3,2)
instead of
round(v1 + v3 + v3 , 2)

After all, that's what you are showing, the rounded values, not the real values.
--
Fernando Dias
[Team Elevate]
Mon, Apr 11 2011 3:06 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Rita


I think you're losing it. Its not the adding up that's wrong

£47.16 + £41.16 + £24.63 = £112.95

Your jpg and what you've posted aren't the same. Why did you post £24.63 and the jpg show £28.24?

With all the above Fernando's probably right - add the rounded values.

Roy Lambert [Team Elevate]
Mon, Apr 11 2011 4:38 AMPermanent Link

John Hay

Ro
> I think you're losing it. Its not the adding up that's wrong
>
> £47.16 + £41.16 + £24.63 = £112.95
>

And you think I need neew glasses Smiley

John

Mon, Apr 11 2011 4:43 AMPermanent Link

John Hay

Roy

In fact with Rita and I there might be a business opportunity Smiley

John

Mon, Apr 11 2011 7:05 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


Ever heard of SpecSavers?

Roy Lambert
Mon, Apr 11 2011 7:55 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Hi Rita,

You have obviously copied the wrong value into the last value, but even
so with the full values of

 47.157
 41.156
 28.240
========
116.553
========

This would round to 116.55

and with the rounded unit values:

 47.16
 41.16
 28.24
========
116.56
========

So it depends upon where you are doing the rounding, in your case it
looks like you should round the unit values first (as that is what you
are displaying on the screen) and add them together last.

Chris Holland


On 10/04/2011 21:32, Rita wrote:
> I thought I had rounding sorted until this one.
> The green numbers add up to £116.55
> £47.16 is £47.157 so ok it rounds to £47.16
> £41.16 is £41.156 as does this to £41.16
> £24.63 is £24.630 and does not need to round
>
> however the 3 amounts don't add up they are a penny
> short. I think I have tried everyway possible to get that
>
> Total to = £116.56
>
> I'm stumped any ideas please.
>
> Rita

--
Chris Holland
[Team Elevate]
Mon, Apr 11 2011 12:39 PMPermanent Link

Rita Tipton

Thank you Sir.
Rita

Mon, Apr 11 2011 12:43 PMPermanent Link

Rita Tipton

He probaly is right then he took the time to try and understand
rather than poke fun at my bad eyesight. Funny thing tho I
just bought a pair of them over the counter specs for reading
and they work Wink£3 quid nice
Rita

]
Mon, Apr 11 2011 12:45 PMPermanent Link

Rita Tipton

Indeed "Bins are us" would be a good name.
Rita
Page 1 of 2Next Page »
Jump to Page:  1 2
Image