+ Reply to Thread
Results 1 to 3 of 3

creating formula using if function

Hybrid View

  1. #1
    juvena
    Guest

    creating formula using if function

    I confused about creating formula using if function for the condition below.

    Labor costs for items with material costs of at least $100 but less than
    $500 are estimated at 50% of material costs.

    I tried everything but did not work please help

    (for example A1 contains a material cost) =if(A1=100<500,A1*0.50) isn't
    that correct?


  2. #2
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479
    Quote Originally Posted by juvena
    I confused about creating formula using if function for the condition below.

    Labor costs for items with material costs of at least $100 but less than
    $500 are estimated at 50% of material costs.

    I tried everything but did not work please help

    (for example A1 contains a material cost) =if(A1=100<500,A1*0.50) isn't
    that correct?
    Hi juvena

    Try this > =IF(AND(A1>=100,A1<=500),A1*0.5,"")
    Paul

  3. #3
    joeu2004@hotmail.com
    Guest

    RE: creating formula using if function

    "juvena" wrote:
    > (for example A1 contains a material cost) =if(A1=100<500,A1*0.50)
    > isn't that correct?


    It is "correct" in the syntactic sense. But it certainly does not
    mean what you think it does.

    (It also does not mean what I think it should!)

    Besides, it is almost never a good idea to omit the "else" part --
    the 3rd parameter of an IF() function, what Excel calls the
    "value_if_false" part. If you do, you can get mixed results: a
    numerical value in one case (A1*0.50), a boolean value (FALSE)
    in another case.

    > I confused about creating formula using if function for the condition below.
    > Labor costs for items with material costs of at least $100 but less than
    > $500 are estimated at 50% of material costs.


    And what are the labor costs when material costs are less than
    $100 or not less than $500?

    The formula you should want is something like:

    =IF(A1 < 100,
    A1*(factor if labor less than $100),
    IF(AND(100<=A1,A1<500),
    A1*50%,
    A1*(factor if labor not less than 500) ) )

    I wrote that the "hard way" so that you could see how the
    AND() function works -- the solution you are probably looking
    for. But it could be written somewhat more simply, namely:

    =IF(A1 < 100,
    A1*(factor if labor less than $100),
    IF(A1 >= 500,
    A1*(factor if labor not less than 500),
    A1*50%) )



+ 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