+ Reply to Thread
Results 1 to 10 of 10

add round up formula within if formula

  1. #1
    Registered User
    Join Date
    10-20-2010
    Location
    Dubai,United Arab Emiretas
    MS-Off Ver
    Excel 2003
    Posts
    36

    add round up formula within if formula

    hello,

    Is there any way to add a round up formula within the if function? the values im using has 2 different ave values
    see attachment for the formula that i use

    thanks
    Attached Files Attached Files
    Last edited by jrortiz2; 10-01-2011 at 06:38 AM.

  2. #2
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: add round up formula within if formula

    Hi,

    What exactly you want to achieve? Can you explain which cells need adding and what result would you expect?

    Cheers

    greekboyuk

  3. #3
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: add round up formula within if formula

    I can't tell what you are trying, perhaps the following will be helpful to you anyway.

    To round up I have used the following logic -- example assumes I want to round up the result of a1/b1 for some reason.
    Please Login or Register  to view this content.
    The logic is: if rounding the number makes it smaller (so the subtraction isnegative), round it and add (1 in the case of rounding with 0 decimal places) -- if rounding does not, just round as per usual.

    If you were going to round to a different decimal place (say 1 place) you would use a slightly different formula....hopefully you can apply this logic.

  4. #4
    Registered User
    Join Date
    10-20-2010
    Location
    Dubai,United Arab Emiretas
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: add round up formula within if formula

    the below is actually what i really want to appear in my formula that includes conditiona formatting.

    -the lower values against last month should show number plus the arrow up
    -the higher values against last month should show - number plus the arrow down
    -no data means NR
    -number 0 data should show "Stable"
    -the same data against last month and current month should also show stable

    as you can see in the attachment in the changes it shows 0 including the arrow right where is should have been 1 and the arrow up

    Hope thats make sense. sorry for the confusing explanation

  5. #5
    Registered User
    Join Date
    10-20-2010
    Location
    Dubai,United Arab Emiretas
    MS-Off Ver
    Excel 2003
    Posts
    36

    if function with round function

    I have the following IF Function and need to be able to use the ROUND Function within this to round the figures to 0. can this be done?


    IFERROR(IF(D14-E14=0,"Stable",D14-E14),IF(AND(E14="-",D14="-"),"NR",IF(D14="-","Gain","Dropped")))

    attachment will show example

    Thanks
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: if function with round function

    why cant you just use the increase decimal button?
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: if function with round function

    You don't say exactly what or where you want it rounded but taking a guess based on the significant digits in C and D of your example

    IFERROR(IF(D14-E14=0,"Stable",ROUND(D14,0)-ROUND(E14,0)),IF(AND(E14="-",D14="-"),"NR",IF(D14="-","Gain","Dropped")))
    Is that what you wanted?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  8. #8
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: if function with round function

    =IFERROR(FIXED(IF(C6-D6=0,"Stable",C6-D6),IF(AND(D6="-",C6="-"),"NR",IF(C6="-","Gain","Dropped"))),0)

    opps sorry, mistake pls ignore
    Last edited by Blake 7; 09-30-2011 at 06:06 PM.

  9. #9
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: add round up formula within if formula

    IFERROR(IF(D14-E14=0,"Stable",Roundup(D14-E14,0)),IF(AND(E14="-",D14="-"),"NR",IF(D14="-","Gain","Dropped")))
    Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  10. #10
    Registered User
    Join Date
    10-20-2010
    Location
    Dubai,United Arab Emiretas
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: add round up formula within if formula

    thanks for the help guys it has been solve now.

+ 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