View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
egarcia egarcia is offline
external usenet poster
 
Posts: 13
Default Multiple if statements with multiple conditions

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.