+ Reply to Thread
Results 1 to 6 of 6

Help with Formula

  1. #1
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    200

    Help with Formula

    I have the formula =if(A1<10,"0",A3-A4) however, what would the formula look like if I wanted to add in a comparison to calculate the result where cell
    A4 is >0 - is this an and/or scenario?

    Please help

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    First of all 0 is returned as text in your formula if you want it as a number loose the " "


    You need to tell us your situations


    If a1<0
    else if a4>0

    or if a1<0 and a4>0

    Explain it clearly in english and then someone will give you the right answer

    Regards

    Dav

  3. #3
    JE McGimpsey
    Guest

    Re: Help with Formula

    One way:

    =IF(AND(A1<10,A4>0),0,A3-A4)

    (This assumes you want the value 0 rather than the text character "0").

    In article <[email protected]>,
    martins <[email protected]> wrote:

    > I have the formula =if(A1<10,"0",A3-A4) however, what would the formula
    > look like if I wanted to add in a comparison to calculate the result
    > where cell
    > A4 is >0 - is this an and/or scenario?
    >
    > Please help


  4. #4
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    200

    Formula help

    your right - I am not being very clear - I will try to explain

    If cell A1 is less than 10 then calculate the result of A3-A4 (where A4 =0) but if A1 is less than 10 but A4 is >0 then calculate A3-A4

    In other words I need the result of A3-A4 where A1 is less than 10 and A4 is 0 but also when A4 is >0 (at the moment my formula is returning false when
    A4 is >0 and what I need it to do is return the value in both situations)

    Does this help?

  5. #5
    David Biddulph
    Guest

    Re: Help with Formula

    "martins" <[email protected]> wrote in
    message news:[email protected]...
    >
    > your right - I am not being very clear - I will try to explain
    >
    > If cell A1 is less than 10 then calculate the result of A3-A4 (where A4
    > =0) but if A1 is less than 10 but A4 is >0 then calculate A3-A4
    >
    > In other words I need the result of A3-A4 where A1 is less than 10 and
    > A4 is 0 but also when A4 is >0 (at the moment my formula is returning
    > false when
    > A4 is >0 and what I need it to do is return the value in both
    > situations)
    >
    > Does this help?


    No it doesn't help much.

    You've told us that if A1 < 10 you want the answer to be A3-A4 in the cases
    where A4 =0 or A4>0.
    You haven't told us what you want if A1>=10.
    You also haven't told us what you want if A1<10 and A4 <0.

    Fill in the gaps in the formula below.

    =IF(A1<10,IF(A4<0,"whatever you want if A1 <10 and A4 <0",A3-A4),"whatever
    you want if A1 >=10")
    --
    David Biddulph



  6. #6
    Brad
    Guest

    Re: Help with Formula

    Is this what you are looking for
    =IF((A1<10),0,A3-max(0,A4))


    "martins" wrote:

    >
    > your right - I am not being very clear - I will try to explain
    >
    > If cell A1 is less than 10 then calculate the result of A3-A4 (where A4
    > =0) but if A1 is less than 10 but A4 is >0 then calculate A3-A4
    >
    > In other words I need the result of A3-A4 where A1 is less than 10 and
    > A4 is 0 but also when A4 is >0 (at the moment my formula is returning
    > false when
    > A4 is >0 and what I need it to do is return the value in both
    > situations)
    >
    > Does this help?
    >
    >
    > --
    > martins
    > ------------------------------------------------------------------------
    > martins's Profile: http://www.excelforum.com/member.php...o&userid=31616
    > View this thread: http://www.excelforum.com/showthread...hreadid=562380
    >
    >


+ 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