Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    917
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Math Formula (Word 2002)

    I need a formula in VBA Word... I want to divide a known number by 50, and round up to the nearest integer (unless, of course, the answer is an integer).

    100 should return 2
    105 should return 3

    How would I write the formula?

    Thanks,
    Richard Barrett

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

    Re: Math Formula (Word 2002)

    Say that your number is stored in a variable x. A possible expression to divide by 50 and round up to the nearest integer is

    <code>-Int(-x / 50)</code>

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    917
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Re: Math Formula (Word 2002)

    Perfect... thank you so much.

    Richard

Posting Permissions

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