Truncating a cell value AFTER the decimal place

From: nano (nano.11xstf_at_excelforum-nospam.com)
Date: 02/20/04


Date: Fri, 20 Feb 2004 12:09:16 -0600

I am assuming that the following question has a simple solution, however
I haven't found the answer after quickly searching the forum and a VBA
book.

I would like to truncate the cell value in the following manner:

25.7873 to 25.787

My understanding of the truncate function is that it will truncate the
value to 25 and I have tried formatting the number with the following:

Selection.NumberFormat = "#.##0"

The NumberFormat only altered the displayed number, not the value of
the number. How can I easily accomplish this.

Thanks in advance,
Bruce

---
Message posted from http://www.ExcelForum.com/


Relevant Pages

  • Truncating and rounding off numbers in VBA
    ... I want to truncate a number so the end result only shows ... I cannot find the function in VBA and its help service is of no ... use a roundoff function in VBA but can't find what it is or if it ...
    (microsoft.public.access.formscoding)
  • Re: Truncating a Double
    ... to truncate the variable so that the result will be always exactly just 2 ... decimal points after the dot. ... VBA in Access is not quite the same thing as VB so you'd probably do better to ask in an Access programming group. ... How you want to handle rounding for values that are .xx5 and values that are negative will be a big part in determining how you want to do it. ...
    (microsoft.public.vb.general.discussion)
  • Truncated text in Union Query
    ... I have been searching thru the postings for a solution and cannot believe ... I understand that Union Queries will truncate ...
    (microsoft.public.access.queries)
  • Re: Delete without log ??
    ... Truncate table will give minimal logging, but that removes all data in the ... (Create your own groups, Forum, FAQ's and a ton more) ...
    (microsoft.public.sqlserver.server)
  • Re: Editing file
    ... push @keep, $_; ... truncate $fh, 0; ... Gunnar Hjalmarsson ... That's what I was searching for. ...
    (perl.beginners)

Loading