+ Reply to Thread
Results 1 to 9 of 9

Help with making a formula

  1. #1
    Registered User
    Join Date
    04-15-2016
    Location
    Oslo
    MS-Off Ver
    Excel 2013
    Posts
    70

    Help with making a formula

    Hi

    cell J6 has the following formula:

    =IFERROR(((H6-E$5)/H6),"")

    I want to return the result "0" to cell J6 if the result of this formula is a negative number. How do I do that?

    Thanks.

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Help with making a formula

    =iferror(iferror((h6-e$5)/h6)^0.5,)^2,"")

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Help with making a formula

    Try this:
    =IFERROR(IF((H6-E$5)/H6<0,0,(H6-E$5)/H6),"")
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Help with making a formula

    Or:

    =IFERROR(MAX((H6-E$5)/H6,0),"")

  5. #5
    Registered User
    Join Date
    04-15-2016
    Location
    Oslo
    MS-Off Ver
    Excel 2013
    Posts
    70

    Re: Help with making a formula

    Sorry but I now think I asked a bit wrong.

    If H6 in the formula is a negative number, then I want J6 to show "0"

    Agian sorry for asking wrong.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Help with making a formula

    Slightly different!!

    =IF(H6<0,0,IFERROR((H6-E$5)/H6,""))

  7. #7
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: Help with making a formula



    =IFERROR(IF(H6<0,0,(H6-E$5)/H6),"")

  8. #8
    Registered User
    Join Date
    04-15-2016
    Location
    Oslo
    MS-Off Ver
    Excel 2013
    Posts
    70

    Re: Help with making a formula

    Thanks you so much!!

    It worked like I wanted.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Help with making a formula

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. Making a formula automated
    By JT_2111 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2014, 12:54 PM
  2. Making calculate formula.
    By Wicket in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-13-2009, 11:24 AM
  3. Making calculate formula.
    By Wicket in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2009, 10:08 AM
  4. Making a formula work across each row!
    By ivygivy in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 09-19-2009, 09:44 PM
  5. Making a certain formula
    By DogStar5988 in forum Excel General
    Replies: 5
    Last Post: 08-01-2007, 05:33 AM
  6. Making this formula work
    By Kleev in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-14-2005, 08:45 PM
  7. Making a formula continuous
    By Neil_Pattison in forum Excel General
    Replies: 4
    Last Post: 10-07-2005, 02:05 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