creating formula using if function

G

Guest

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?
 
P

Paul Sheppard

juvena said:
I confused about creating formula using if function for the conditio
below.

Labor costs for items with material costs of at least $100 but les
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,""
 
G

Guest

juvena said:
(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%) )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top