Consulting

Results 1 to 5 of 5

Thread: random

  1. #1
    VBAX Tutor
    Joined
    Dec 2009
    Posts
    295
    Location

    random

    Hi
    how can i control the precision of random function.
    i need instead of 2.36666664584 to be only 4 numbers after the point 2.3666

    thanks

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    format your cell as number to 4 decimal places!
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    VBAX Tutor
    Joined
    Dec 2009
    Posts
    295
    Location
    Hi
    It does not working after i do the format your cell as number to 4 decimal places i select the cell and i can see on (fx) row above that it does not change.

  4. #4
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Have you tried INT() or TRUNC() or ROUND() ?

  5. #5
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Quote Originally Posted by oleg_v
    Hi
    It does not working after i do the format your cell as number to 4 decimal places i select the cell and i can see on (fx) row above that it does not change.
    The "fx" is the formula bar and you will see the full number there, it's the cell you are truncating!

    How about a workbook?
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

Posting Permissions

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