Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
a b
1 TRUE 10 2 TRUE 8 3 2 4 4 5 TRUE 5 I'm trying to get an if function to work with multiple conditions. For example if(a1=true,a2=true,a5=true,sum(b3:b4), if (a1=true,a2=true,a5=false,sum(b3:b5), if a1=false,a2=false,a5=true,sum(b1:b4). First condition should =6, second=11, & third should be 24. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi
Try = if(and(a1=true,a2=true,a5=true),sum(b3:b4, if(and(a1=true,a2=true,a5=false),sum(b3:b5), if(and(a1=false,a2=false,a5=true),sum(b1:b4)."" ))) -- Regards Roger Govier "egarcia" wrote in message ... a b 1 TRUE 10 2 TRUE 8 3 2 4 4 5 TRUE 5 I'm trying to get an if function to work with multiple conditions. For example if(a1=true,a2=true,a5=true,sum(b3:b4), if (a1=true,a2=true,a5=false,sum(b3:b5), if a1=false,a2=false,a5=true,sum(b1:b4). First condition should =6, second=11, & third should be 24. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Here is the exact formula, it returns false instead of a value.
IF(AND(Worksheet!N356=TRUE,Worksheet!N358=TRUE,Wor ksheet!N360=TRUE),SUM('Summary Sheet'!M34:M40),IF(AND(Worksheet!N356=TRUE,Workshe et!N358=FALSE,Worksheet!N360=FALSE),SUM('Summary Sheet'!M33:M41),IF(AND(Worksheet!N356=TRUE,Workshe et!N358=FALSE,Worksheet!N360=TRUE),SUM('Summary Sheet'!M33:M40),IF(AND(Worksheet!N356=TRUE,Workshe et!N358=TRUE,Worksheet!N360=FALSE),SUM('Summary Sheet'!M34:M41),IF(AND(Worksheet!N356=FALSE,Worksh eet!N358=FALSE,Worksheet!N360=TRUE),SUM('Summary Sheet'!M32:M40),IF(AND(Worksheet!N356=FALSE,Worksh eet!N358=FALSE,Worksheet!N360=FALSE),SUM('Summary Sheet'!M32:M41))))))) "Roger Govier" wrote: Hi Try = if(and(a1=true,a2=true,a5=true),sum(b3:b4, if(and(a1=true,a2=true,a5=false),sum(b3:b5), if(and(a1=false,a2=false,a5=true),sum(b1:b4)."" ))) -- Regards Roger Govier "egarcia" wrote in message ... a b 1 TRUE 10 2 TRUE 8 3 2 4 4 5 TRUE 5 I'm trying to get an if function to work with multiple conditions. For example if(a1=true,a2=true,a5=true,sum(b3:b4), if (a1=true,a2=true,a5=false,sum(b3:b5), if a1=false,a2=false,a5=true,sum(b1:b4). First condition should =6, second=11, & third should be 24. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Return a value for me, but doesn't need the last test
=IF(AND(Worksheet!N356=TRUE,Worksheet!N358=TRUE,Wo rksheet!N360=TRUE),SUM('Summary Sheet'!M34:M40), IF(AND(Worksheet!N356=TRUE,Worksheet!N358=FALSE,Wo rksheet!N360=FALSE),SUM('Summary Sheet'!M33:M41), IF(AND(Worksheet!N356=TRUE,Worksheet!N358=FALSE,Wo rksheet!N360=TRUE),SUM('Summary Sheet'!M33:M40), IF(AND(Worksheet!N356=TRUE,Worksheet!N358=TRUE,Wor ksheet!N360=FALSE),SUM('Summary Sheet'!M34:M41), IF(AND(Worksheet!N356=FALSE,Worksheet!N358=FALSE,W orksheet!N360),SUM('Summary Sheet'!M32:M40),SUM('Summary Sheet'!M32:M41)))))) -- --- HTH Bob (change the xxxx to gmail if mailing direct) "egarcia" wrote in message ... Here is the exact formula, it returns false instead of a value. IF(AND(Worksheet!N356=TRUE,Worksheet!N358=TRUE,Wor ksheet!N360=TRUE),SUM('Summary Sheet'!M34:M40),IF(AND(Worksheet!N356=TRUE,Workshe et!N358=FALSE,Worksheet!N360=FALSE),SUM('Summary Sheet'!M33:M41),IF(AND(Worksheet!N356=TRUE,Workshe et!N358=FALSE,Worksheet!N360=TRUE),SUM('Summary Sheet'!M33:M40),IF(AND(Worksheet!N356=TRUE,Workshe et!N358=TRUE,Worksheet!N360=FALSE),SUM('Summary Sheet'!M34:M41),IF(AND(Worksheet!N356=FALSE,Worksh eet!N358=FALSE,Worksheet!N360=TRUE),SUM('Summary Sheet'!M32:M40),IF(AND(Worksheet!N356=FALSE,Worksh eet!N358=FALSE,Worksheet!N360=FALSE),SUM('Summary Sheet'!M32:M41))))))) "Roger Govier" wrote: Hi Try = if(and(a1=true,a2=true,a5=true),sum(b3:b4, if(and(a1=true,a2=true,a5=false),sum(b3:b5), if(and(a1=false,a2=false,a5=true),sum(b1:b4)."" ))) -- Regards Roger Govier "egarcia" wrote in message ... a b 1 TRUE 10 2 TRUE 8 3 2 4 4 5 TRUE 5 I'm trying to get an if function to work with multiple conditions. For example if(a1=true,a2=true,a5=true,sum(b3:b4), if (a1=true,a2=true,a5=false,sum(b3:b5), if a1=false,a2=false,a5=true,sum(b1:b4). First condition should =6, second=11, & third should be 24. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You are missing the final false argument.
I have assumed you want Null "" if all cases fail to be satisfied. It is inserted after the final SUM() term. =IF(AND(Worksheet!N356=TRUE,Worksheet!N358=TRUE,Wo rksheet!N360=TRUE),SUM('Summary Sheet'!M34:M40), IF(AND(Worksheet!N356=TRUE,Worksheet!N358=FALSE,Wo rksheet!N360=FALSE),SUM('Summary Sheet'!M33:M41), IF(AND(Worksheet!N356=TRUE,Worksheet!N358=FALSE,Wo rksheet!N360=TRUE),SUM('Summary Sheet'!M33:M40), IF(AND(Worksheet!N356=TRUE,Worksheet!N358=TRUE,Wor ksheet!N360=FALSE),SUM('Summary Sheet'!M34:M41), IF(AND(Worksheet!N356=FALSE,Worksheet!N358=FALSE,W orksheet!N360=TRUE),SUM('Summary Sheet'!M32:M40), IF(AND(Worksheet!N356=FALSE,Worksheet!N358=FALSE,W orksheet!N360=FALSE), SUM('Summary Sheet'!M32:M41,""))))))) -- Regards Roger Govier "egarcia" wrote in message ... Here is the exact formula, it returns false instead of a value. IF(AND(Worksheet!N356=TRUE,Worksheet!N358=TRUE,Wor ksheet!N360=TRUE),SUM('Summary Sheet'!M34:M40),IF(AND(Worksheet!N356=TRUE,Workshe et!N358=FALSE,Worksheet!N360=FALSE),SUM('Summary Sheet'!M33:M41),IF(AND(Worksheet!N356=TRUE,Workshe et!N358=FALSE,Worksheet!N360=TRUE),SUM('Summary Sheet'!M33:M40),IF(AND(Worksheet!N356=TRUE,Workshe et!N358=TRUE,Worksheet!N360=FALSE),SUM('Summary Sheet'!M34:M41),IF(AND(Worksheet!N356=FALSE,Worksh eet!N358=FALSE,Worksheet!N360=TRUE),SUM('Summary Sheet'!M32:M40),IF(AND(Worksheet!N356=FALSE,Worksh eet!N358=FALSE,Worksheet!N360=FALSE),SUM('Summary Sheet'!M32:M41))))))) "Roger Govier" wrote: Hi Try = if(and(a1=true,a2=true,a5=true),sum(b3:b4, if(and(a1=true,a2=true,a5=false),sum(b3:b5), if(and(a1=false,a2=false,a5=true),sum(b1:b4)."" ))) -- Regards Roger Govier "egarcia" wrote in message ... a b 1 TRUE 10 2 TRUE 8 3 2 4 4 5 TRUE 5 I'm trying to get an if function to work with multiple conditions. For example if(a1=true,a2=true,a5=true,sum(b3:b4), if (a1=true,a2=true,a5=false,sum(b3:b5), if a1=false,a2=false,a5=true,sum(b1:b4). First condition should =6, second=11, & third should be 24. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autosum results of multiple if statements? | Excel Worksheet Functions | |||
How do I return a value based on multiple possible conditions? | Excel Worksheet Functions | |||
If Function with Multiple Conditions | Excel Discussion (Misc queries) | |||
How do I sort data with multiple conditions? | Excel Worksheet Functions | |||
Lookup with multiple conditions | Excel Discussion (Misc queries) |