Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    ROUND TO NEAREST HALF HOUR (Office 97 SR2)

    Hi

    I think this may be a simple one, but not for me. I have a field milesto and one called timeto, I have applied the following =[milesto]/50 but I need it to round up or down to the nearest half hour. ie 230 / 50 = 4.6 but I need it to read 4.5

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ROUND TO NEAREST HALF HOUR (Office 97 SR2)

    To round a number x to the nearest multiple of 0.5, use Int(2 * x + 0.5) / 2
    In your case:
    =Int(2*[MilesTo]/50+0.5)/2

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: ROUND TO NEAREST HALF HOUR (Office 97 SR2)

    Hi

    Hans thank you very much that was perfect.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    If you are a fool at forty, you will always be a fool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •