Jun 7, 2005 #1 ibvma Programmer Jun 24, 2002 5 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 Sep 1, 2003 5,595 CA ? val(format (10436/100,"0"))*100 ? val(format (32779/100,"0"))*100 Upvote 0 Downvote
Jun 7, 2005 #3 PHV MIS Nov 8, 2002 53,708 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 Aug 22, 2001 102 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 Mar 14, 2005 2,924 GB Try (MyVar\100+1)*100 Hope this helps. Upvote 0 Downvote
Jul 8, 2005 #6 earthandfire Programmer Mar 14, 2005 2,924 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 Mar 14, 2005 2,924 GB ... and to round down to the nearest 100: (myvar \ 100) * 100 Hope this helps Upvote 0 Downvote