+ Reply to Thread
Results 1 to 7 of 7

Round function and Trunc function

  1. #1
    Registered User
    Join Date
    04-01-2016
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    56

    Round function and Trunc function

    Could somebody help me please, I'm having a slight problem with a formula. I have this nested inside an 'if/iserror':

    ("£"&ROUND(G33/G77,2)&...

    to give a currency amount, and it works okay, except that it cuts the zero off the end of the amount if the second figure after the decimal place is a zero, eg it gives '£30.4' when I want '£30.40'. I tried the 'trunc' function too but that didn't work. Is there a function or a way to specify EXACTLY how many digits you want after the decimal place, ie a currency amount?

    Thanks very much.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Round function and Trunc function

    Increase the cell format to 2 decimal places.
    If you right click the cell you'll get an icon for "increase decimal places".

    BSB

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Round function and Trunc function

    you can try with: ("£"&FIXED(G33/G77)&...

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Round function and Trunc function

    Note that your formula will not return a currency amount - it will return a text value that looks like currency. It would be better to format the cell as currency (which will give you the £ sign automatically) and allow the formula to return a number. If you really want to return a text value, then you will need to do it like this:

    ("£"&TEXT(ROUND(G33/G77,2),"0.00")&...

    which will give you two decimal places.

    Hope this helps.

    Pete

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Round function and Trunc function

    Pete, this is exactly the same:

    ("£"&TEXT(ROUND(G33/G77,2),"0.00")&...

    ("£"&FIXED(G33/G77)&...

    FIXED() with no parameters returning value as text with 2 places after dot.
    Both are OK but second is shorter

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Round function and Trunc function

    Yes, I thought the OP might need a bit more in the way of explanation.

    Pete

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Round function and Trunc function

    No problem, it was my humble opinion only

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Averageif with round or trunc
    By epalmer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-11-2014, 02:48 PM
  2. [SOLVED] If Statement with a Divisible-By function and Round Function
    By thanhie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-06-2013, 01:00 AM
  3. Problem Inserting Round function into an IF function
    By Ash87 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-11-2013, 05:37 PM
  4. Bug in the Trunc function !?!
    By Mac_Sr in forum Excel General
    Replies: 5
    Last Post: 06-24-2011, 01:12 AM
  5. Trunc function
    By vbadummy in forum Excel General
    Replies: 7
    Last Post: 05-25-2009, 04:51 PM
  6. Trunc Function not performing
    By cstauber in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-23-2008, 09:19 AM
  7. VB Function Round vs Excel function Round not behaving the same Od
    By Bud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2006, 12:45 AM
  8. How about truncating a decimal as the Trunc() function does?
    By skrimpy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-27-2005, 06:38 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1