+ Reply to Thread
Results 1 to 12 of 12

how to get the result with two decimals rounded off

  1. #1
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    how to get the result with two decimals rounded off

    i want to get the result in two decimals .the present formula gives the result with one decimal. how can i do this? thanks. pls see the attached file.

    original formula is=IF(S6>0,S6*100/600," ")


    i have tried with this one-=ROUND(IF(S6>0,S6*100/600," "),2)


    FOR some unknown reason this formula is not working.
    Last edited by sumesh56; 10-22-2017 at 10:52 PM.

  2. #2
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: how to get the result with two decimals rounded off

    error downloading your file...

  3. #3
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: how to get the result with two decimals rounded off

    your second formula should work. Are you able to upload your workbook again? What result do you get?

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: how to get the result with two decimals rounded off

    See my guidance in below youtube link:
    https://www.youtube.com/watch?v=-AUt...-yd5FEneBt75Fa
    Quang PT

  5. #5
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: how to get the result with two decimals rounded off

    thanks bebo21999.
    but this idea i know and have quoted under my attachement file. something else i wanted

  6. #6
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: how to get the result with two decimals rounded off

    Quote Originally Posted by maym View Post
    your second formula should work. Are you able to upload your workbook again? What result do you get?
    thanks for the try. here is the file again uploaded for you.

  7. #7
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: how to get the result with two decimals rounded off

    You either have to format the cells (via the toolbar or otherwise) or which I wouldn't advise enclose the formula in a text function so K1 would be =TEXT(IF(J1>0,J1*100/480," "),"0.00") but to get the 2 decimal places you have made it text, which then will not sum in calculations.

    I cant see the problem of formatting the column

    Rounding changes the underlying number
    formating changes the way any number is displayed

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: how to get the result with two decimals rounded off

    Why not just change the formatting to show 2 decimals?
    I dont really understand what the problem is here?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: how to get the result with two decimals rounded off

    thanks davsth for the suggestion. it is too complicated. i will go by the formatcells option.

  10. #10
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: how to get the result with two decimals rounded off

    thanks fdibbins for the suggestion. there is no porblem in selecting the cells - format cells option-select numbers-resstrict the decimals to two-done. but i thought something else could be coming easier than this one.

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,706

    Re: how to get the result with two decimals rounded off

    To avoid getting the #VALUE error when the corresponding entry in column J is zero, modify your second formula to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  12. #12
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: how to get the result with two decimals rounded off

    I'm shocked it took 11 posts to come up with this answer.
    =IF(S6>0,ROUND(S6*100/480,2)," ")
    The original
    =ROUND(IF(S6>0,S6*100/600," "),2)
    The reason this gives #Value! errors is because when the IF is FALSE, it returns " "
    That's a TEXT string
    ROUND(textstring,2) = Error. How do you round a text string ??

    So you have to apply the round to the actual mathematical calculation instead of on the result of the IF.

+ 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. Rounded Result with Goal Seek
    By Crownman in forum Excel General
    Replies: 8
    Last Post: 10-12-2018, 12:30 PM
  2. [SOLVED] ROUNDED the result
    By MADA BLACK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2016, 06:56 PM
  3. [SOLVED] I need to convert [h]:mm to decimals, allowing for a negative result
    By banandtmj in forum Excel General
    Replies: 7
    Last Post: 02-27-2014, 04:00 PM
  4. syntax for comparing a rounded number to a rounded list
    By stockgoblin42 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-10-2013, 10:12 AM
  5. [SOLVED] SumsWhen cells are rounded to 3 decimals
    By madmam in forum Excel General
    Replies: 2
    Last Post: 07-27-2006, 12:00 PM
  6. [SOLVED] Excel extending result to multiple decimals
    By Ardus Petus in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-12-2006, 07:10 AM
  7. [SOLVED] Excel extending result to multiple decimals
    By dls2193 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-11-2006, 10:30 AM

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