Jun 7, 2005 #1 ibvma Programmer Joined Jun 24, 2002 Messages 5 Location US I want to Round currency numbers to the the nearest 100. ie: $10,436 rounded to $10,400 $32,779 rounded to $32,800 The results can be either text or numerical. How do I do this in a Query?? Thanks in advance
I want to Round currency numbers to the the nearest 100. ie: $10,436 rounded to $10,400 $32,779 rounded to $32,800 The results can be either text or numerical. How do I do this in a Query?? Thanks in advance
Jun 7, 2005 1 #2 Golom Programmer Joined Sep 1, 2003 Messages 5,595 Location CA ? val(format (10436/100,"0"))*100 ? val(format (32779/100,"0"))*100 Upvote 0 Downvote
Jun 7, 2005 #3 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR 100*Round(myCurrency/100) Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
100*Round(myCurrency/100) Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Jul 8, 2005 #4 OU18 Programmer Joined Aug 22, 2001 Messages 102 Location US All, Is there a way to make this work so that it will round up to the nearest 100 no matter if it is below 50 or not IE 736 would round to 800 instead of down to 700. Thanks Upvote 0 Downvote
All, Is there a way to make this work so that it will round up to the nearest 100 no matter if it is below 50 or not IE 736 would round to 800 instead of down to 700. Thanks
Jul 8, 2005 #5 earthandfire Programmer Joined Mar 14, 2005 Messages 2,924 Location GB Try (MyVar\100+1)*100 Hope this helps. Upvote 0 Downvote
Jul 8, 2005 #6 earthandfire Programmer Joined Mar 14, 2005 Messages 2,924 Location GB I've just noticed a slight bug in my last post: ((MyVar \ 100) - (MyVar Mod 100 > 0)) * 100 solves it MyVar Result 100 100 101 200 199 200 200 200 201 300 etc. Hope this helps. Upvote 0 Downvote
I've just noticed a slight bug in my last post: ((MyVar \ 100) - (MyVar Mod 100 > 0)) * 100 solves it MyVar Result 100 100 101 200 199 200 200 200 201 300 etc. Hope this helps.
Jul 8, 2005 #7 earthandfire Programmer Joined Mar 14, 2005 Messages 2,924 Location GB ... and to round down to the nearest 100: (myvar \ 100) * 100 Hope this helps Upvote 0 Downvote