Consulting

Results 1 to 5 of 5

Thread: Dropping off all characters after .xx decimal place (not rounding up or down)

  1. #1
    VBAX Regular
    Joined
    Jan 2007
    Posts
    42
    Location

    Dropping off all characters after .xx decimal place (not rounding up or down)

    Hi all,

    I got a small tricky question for you all..

    I have a row of data in column A:

    eg

    185.60214.40225.00235.20244.40


    in column B, I want to multiply this by .333

    I then end up with these amounts in column B:

    61.804861.86666771.4666677578.4


    The challenging question is, I want to Completely DROP the characters after the decimal .XX so New figures will be reported with no reference to previous figures. The new output should be now:

    61.80
    61.86
    71.46
    75
    78.4

    Note this is NOT a rounding off function to a higher or lower number, Its a complete Drop off anything after .XX

    How do we do this so that say if you want to multiply 61.80 x 5 it would equal 309 and NOT multiply the backing figure of 61.8048 x 5 to give a slightly different figure..

    How do we do this???

    Thankyou sooooo much in advance for all your help

  2. #2
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    There's probably other (and more elegant) solutions for this, but off the top of my head one solution is:

    =INT(A1*100)/100

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =ROUNDDOWN(A1*0.333,2)

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You could also use

    =TRUNC(A1*0.333,2)

  5. #5
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Nice one xld!

Posting Permissions

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