Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]() juvena Wrote: 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 Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=479027 |
#3
![]() |
|||
|
|||
![]()
"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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formula within IF function | Excel Discussion (Misc queries) | |||
Need Help: 'sheets' function with a variable in a formula | Excel Worksheet Functions | |||
undefined function error when creating xls pivot from mdb qry | Excel Worksheet Functions | |||
Date & Time | New Users to Excel | |||
function of "+" in the formula "=+(B19/50)*B10 | Excel Discussion (Misc queries) |