+ Reply to Thread
Results 1 to 7 of 7

ROUND in IF

  1. #1
    Registered User
    Join Date
    04-22-2007
    Posts
    11

    ROUND in IF

    Hello,

    please forgive if my questions are trivial but they are not so to me!



    How can I put ROUND function inside the IF formula?

    For Example if I have something like this in A5 cell:

    =IF(D2="something";(D3/75)*100;D3*1,333333)

    How and where I should put the ROUND function so that the either result would be nicely rounded?

    I'd like to keep two decimal places, so choosing zero decimal places in Format Cells/Number/Decimal places is not good option for me.

    Please help this novice, thanks!
    Last edited by IvicaOS; 04-14-2009 at 03:42 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: ROUND in IF

    =ROUND(IF(D2="something";(D3/75)*100;D3*1,333333),2) would round to 2 decimals.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-22-2007
    Posts
    11

    Re: ROUND in IF

    Tnx very much,

    but when I do that I get exactly the same result as without ROUND function. I mean exactly the same, and that number "2" at the end, that defines number of decimal places, must go after ";" and not after ",".

    I was more hopping to get, for example, number 75.000,00 instead of 75.000,02 or 133.333,00 instead of 133.333,33. (if D2 is SOMETHING and D3 is 100.000,00 from my question)

    Tnx!
    Last edited by IvicaOS; 04-13-2009 at 11:39 PM.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: ROUND in IF

    You have different versions of excell.. Some of them use , instead of ;... Just adopt it as you need to, but formula is the same.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: ROUND in IF

    Again, to clarify... the ; or , is not version dependent - it is entirely down to regional settings on the client machine.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: ROUND in IF

    Quote Originally Posted by IvicaOS View Post
    Tnx very much,

    but when I do that I get exactly the same result as without ROUND function. I mean exactly the same, and that number "2" at the end, that defines number of decimal places, must go after ";" and not after ",".

    I was more hopping to get, for example, number 75.000,00 instead of 75.000,02 or 133.333,00 instead of 133.333,33. (if D2 is SOMETHING and D3 is 100.000,00 from my question)

    Tnx!
    Perhaps then:


    =ROUND(IF(D2="something";(D3/75)*100;D3*1,333333);0)

    formatted as Number with 2 decimal places.

  7. #7
    Registered User
    Join Date
    04-22-2007
    Posts
    11

    Thumbs up Re: ROUND in IF

    YES, YES, THAT'S IT, THAT'S IT!



    Thank you very much, what I wouldn't give to have your knowlege, thanks @NBVC, and thanks to other guys for clearing up the "," or ";" issue!

    Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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