|
Excel Magic Trick 521: Bankers Rounding (Half-Way-Even) vs. Arithmetic Rounding
Video | Similar Helpful Excel Resources
See how to Round numbers two different ways: 1.School Rounding: 5 or greater add 1, 4 or less leave as is. 2.Bankers Rounding : 5 round to nearest even, 6 or greater add 1, 4 or less leave as is. See four methods: 1.EXCEL ROUND Function 2.User Defined Function VBA ROUND 3.Access Database Round Function 4.MOD, ROUND functions formula Barry Houdini
Bill Mr Excel Jelen video: ASTM E29 Rounding - 1046 - Learn Excel from MrExcel Podcast
John Pfeffer Highline Community College Chemistry teacher
Got a Question? Ask it Here in the Forum.
Similar Helpful Excel Resources
Hi,
I'm trying to use the VBA Round() function in excel but I'm getting odd results sometimes. Example below.
Number to round to 7 decimal places: 0.71263125
Using the VBA Round() function returns 0.7126313 which is incorrect.
It should be 0.7126312.
However what's really strange is that if I change the original number to
0.71263225 (i.e. the 6th number), I get the correct answer of 0.7126322.
Two other examples of it not working correctly are (rounding to 7):
2.27683045 rounds to 2.2768305
3.00487565 rounds to 3.0048757
Any ideas why this is happening?
Thanks.
Hi,
I'm trying to use the VBA Round() function in excel but I'm getting odd results sometimes. Example below.
Number to round to 7 decimal places: 0.71263125
Using the VBA Round() function returns 0.7126313 which is incorrect.
It should be 0.7126312.
However what's really strange is that if I change the original number to
0.71263225 (i.e. the 6th number), I get the correct answer of 0.7126322.
Two other examples of it not working correctly are (rounding to 7):
2.27683045 rounds to 2.2768305
3.00487565 rounds to 3.0048757
Any ideas why this is happening?
Thanks.
I am working with our vendor on a website that downloads data into excel but some of the numbers that end in .5 are rounding down instead of up. Looking into it on the web it looks like this is due to bankers round that VBA uses. Is there a line of code that you can put at the beginning of VBA code that would change the rounding to arithmetic?
hi everyone,
I am having troubles using bankers rounding on calculated cells. It is not working properly with me. I have listed below on what happens:
cell value (a1) = bankers rounding cell value (b1)
21.85 = 21.8
21+.85 = 21.8
63/3+.85 = 21.8
1861/8516*100 = 21.9 (should be 21.8)
I have tried using brackets in different ways and still the same. Is there something I am not seeing or does excel work in a different way then it should? Thanks for looking
Hi,
I was using the "round" functionin VBA and realized that it does not work, because it uses the "Bankers" method of rounding, whereas I want the "Arithmatic" rounding, I looked through the web and went to:
http://support.microsoft.com/kb/196652
But the problem is the function is not working.
HTML Code:
Function AsymArith(ByVal X As Double, _
Optional ByVal Factor As Double = 1) As Double
AsymArith = Int(X * Factor + 0.5) / Factor
End Function
I put in AsymArith(8010.095,2) and it gives me 8011.
I also tried this function:
HTML Code:
Function myRound(num, Optional places As Long = 0)
If Int(num) Mod 2 = 0 Then
myRound = Round(num + 1 / (10 ^ places), places) - 1 / (10 ^ places)
Else
myRound = Round(num, places)
End If
End Function
myRound(8010.095,2) gives 8010.09
I cant get rid of the underlines. A
Also I don't want to use Application.round because this will slow down my code too much
Thanks
I am following this tutorial from youtube. It is a search function to search for a specefic word in an entire row. Here is the first part of the code:
Code:
=SEARCH(C$3,Table2[[#This Row],[DESCRIPTION]])
except i only get a value in the cell that i typed this in, instead of it searching the rest of the row like in the tutorial. i can't figure out how to fix this. anyone know what im doing wrong?
Good morning,
trying to find out what to do with my spreadsheet and the formulas in it.
If you look into the file 369. I can get to the stage where it outlines the mismatch figure. In the example it is 6 Mismatches.
But I cannot seem to get the table belwo right. Everytime I try and copy past the formula, the first set of data is the one from the first line and then I get a #NUM error, due to the fact that there seems to be a number reoccurence somewhere.
I took the youtube tutorial, but even copying that formula did not work.
My table consist of 2 sets of 600 values each.
Can someone tell me why I am getting this error and help me resolve the issue that the result is an existing set of data?
THANK YOU
BayerStars23
[IMG]file:///C:/Users/BINGLE%7E1/AppData/Local/Temp/moz-screenshot.png[/IMG][IMG]file:///C:/Users/BINGLE%7E1/AppData/Local/Temp/moz-screenshot-1.png[/IMG]
Hello,
I am constructing a make-shift database in excel but can't seem to find a way to get magic trick #213 to work.
What I am trying to do is create a dynamic filter via 16 criteria. I would like any results that match all criteria that I specify and then displays results in a separate table to the right.
Thank you so much for your help - I would attach my spreadsheet to this message if I knew how.
BR,
PR
Hello there.
First, and before all, I must admit that I am a kind a "dumb" for Excel, because I always were using it, only for better look's of simple tables, schedule's and similar. Although, I was all the time aware of great power's of this program, but newer tested it.
So, finally after few years of tempting, I decided to make a proper "order-list" for the shop in which I work. What I needed is to ,based on products and their prices, make a drop-down box, with list of the products, and after choosing one , proper price will be shown in next column. I find out how to do it with "Excel magic trick #5" on Youtube.
This is what i achieved:
http://i49.tinypic.com/dorzgn.jpg
However,
You see that in row 16, or line 2 in the order box ,we have #N/A below Cena (Price), Iznos PDV (amount of VAT), Cena sa PDV (Amount with VAT), and Iznos (Total amount). If we choose one of the product from drop-down box (now, as You can see none is chosen) and type number in Kolicina(Quantity) column, all this would be automatically changed into proper value.
But what if we have only one thing in order box, instead of 2 or all of 10 ? How to avoid those #N/A, and make instead to be blank cell, which is to be counted as 0, because of final calculation?
In this order-form we have only line 1 and 2 programed to have drop-down box in line Naziv robe (Name of the product). If I putted same drop-down boxes in rest 8 columns, #N/A would be shown in all programed cells bellow, like in line 2...
Kind regards from Serbia
Looking for a little help tweaking Excel Magic Trick 185. I've reached what is probably just a mental block.
I'm trying to adjust a spreadsheet for work using the processes described in Excel MagicTrick 185. (Great series, by the way...) The catch is that the source data table can not be modified under any circumstances (we've already asked).
The problem is different than EMT_185 in that there are 9 columns that can potentially define a match as opposed to just the one shown in EMT_185. There are two user options ('I-III' and 'A-C') which in combination establish the headings for the 9 possible conditions (I-A, II-A, III-A ...) .
(See the linked spreadsheet) I've been able to:
determine if a row in the source matches user provided conditions (col Y),
get the count of matched source rows (row 26),
determine the match instance (col AA), and
place the source data in the output table (col AC)
What I can't quite get my mind around is suppressing the blanks in the output (i.e.:getting match 1 on row 1, match 2 on row 2, etc.)
What am I missing? Please help. A spreadsheet showing what I have so far is located on google docs. Perhaps you could make a new EMT out of it!
BTW.. this used to be done via vba, however that is no longer an option (don't ask... It just isn't, and it's not a topic that is open to discussion -- we tried).
|
|