Sep 3, 2007 #1 TimTDP Technical User Feb 15, 2004 373 ZA In access 2000 I need to round numbers to the nearest half ie. 10.30 becomes 10.50 10.20 becomes 10.00 10.65 becomes 10.50 10.85 becomes 11.00 how can I do this?
In access 2000 I need to round numbers to the nearest half ie. 10.30 becomes 10.50 10.20 becomes 10.00 10.65 becomes 10.50 10.85 becomes 11.00 how can I do this?
Sep 3, 2007 1 #2 Remou Technical User Sep 30, 2002 13,030 BE How about: [tt]Y = IIf(X - Int(X) < 0.26, Int(X), IIf(X - Int(X) < 0.76, Int(X) + 0.5, Int(X) + 1))[/tt] Upvote 0 Downvote
How about: [tt]Y = IIf(X - Int(X) < 0.26, Int(X), IIf(X - Int(X) < 0.76, Int(X) + 0.5, Int(X) + 1))[/tt]
Sep 3, 2007 Thread starter #3 TimTDP Technical User Feb 15, 2004 373 ZA Thanks I was hoping for an inbuilt function! Upvote 0 Downvote
Sep 3, 2007 1 #4 CaptainD Programmer Jul 13, 1999 644 US How about Code: Select Round(Num * 2, 0) / 2 Note: GMastros gave me this for SQL server, not sure if it works with Access. Upvote 0 Downvote
How about Code: Select Round(Num * 2, 0) / 2 Note: GMastros gave me this for SQL server, not sure if it works with Access.
Sep 3, 2007 #5 Remou Technical User Sep 30, 2002 13,030 BE Thanks for that, CaptainD, it works for me. Upvote 0 Downvote