Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
if 200 and <300 formula
how do i do a if A1 200 and <300 return A1 otherwise return 0. i can't get
the logic to work |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
if 200 and <300 formula
=IF(AND(A1200,A1<300),A1,0)
Regards Trevor "Ann" wrote in message ... how do i do a if A1 200 and <300 return A1 otherwise return 0. i can't get the logic to work |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
if 200 and <300 formula
Ann
=if(and(A1200,A1<300),A1,0) is one way. Good luck. Ken Norfolk, Va On Jun 25, 4:18 pm, Ann wrote: how do i do a if A1 200 and <300 return A1 otherwise return 0. i can't get the logic to work |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
if 200 and <300 formula
One way is with two IF statements. logically reads:
If (A1200 then If A1<300 then A1, else 0), else 0) =IF(A1200,IF(A1<300,A1,0),0) |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
if 200 and <300 formula
how do i do a if A1 200 and <300 return A1 otherwise
return 0. i can't get the logic to work Everyone has given you the IF function method, so let me be different.<g =A1*AND(A1200,A1<300) Rick |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
if 200 and <300 formula
thanks all, the first was the easiest and it works!
"Rick Rothstein (MVP - VB)" wrote: how do i do a if A1 200 and <300 return A1 otherwise return 0. i can't get the logic to work Everyone has given you the IF function method, so let me be different.<g =A1*AND(A1200,A1<300) Rick |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
if 200 and <300 formula
Or even
=A1*(A1200)*(A1<300) -- Regards Roger Govier "Rick Rothstein (MVP - VB)" wrote in message ... how do i do a if A1 200 and <300 return A1 otherwise return 0. i can't get the logic to work Everyone has given you the IF function method, so let me be different.<g =A1*AND(A1200,A1<300) Rick |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
if 200 and <300 formula
Or even
=A1*(A1200)*(A1<300) Yeah, I was going to post that with an explanation that understanding this construction will be helpful in making use of such functions as SUMPRODUCT later on; but I had to take care of something and couldn't get back to my computer until just now. Rick |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
if 200 and <300 formula
Yes Rick, I posted in haste and should have explained to the OP that the
tests (A1200) (A1<300) would lead to a True or False result. When Multiplied together, the True's would be coerced to 1's and the False's to 0's Hence A1*TRUE*TRUE becomes A1*1*1 which returns the value in A1 If either (or both) of the tests is False, then we get 0. A1*0*1 = 0 A1*1*0 = 0 As you rightly say, understanding this principle, does help with the understanding of other functions such as Sumproduct. -- Regards Roger Govier "Rick Rothstein (MVP - VB)" wrote in message ... Or even =A1*(A1200)*(A1<300) Yeah, I was going to post that with an explanation that understanding this construction will be helpful in making use of such functions as SUMPRODUCT later on; but I had to take care of something and couldn't get back to my computer until just now. Rick |
#10
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
if 200 and <300 formula
Yes Rick, I posted in haste and should have explained to the OP that the
tests (A1200) (A1<300) would lead to a True or False result. When Multiplied together, the True's would be coerced to 1's and the False's to 0's Hence A1*TRUE*TRUE becomes A1*1*1 which returns the value in A1 If either (or both) of the tests is False, then we get 0. A1*0*1 = 0 A1*1*0 = 0 I was going to make the OP look it up and try to decipher it... in thinking about it, it is better that the explanation be given directly as you did... good job there. Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|