Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Multiple if statements with multiple conditions

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Multiple if statements with multiple conditions

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   Report Post  
Posted to microsoft.public.excel.misc
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.





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default Multiple if statements with multiple conditions

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Multiple if statements with multiple conditions

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autosum results of multiple if statements? Golf Nut Excel Worksheet Functions 2 September 13th 06 06:46 PM
How do I return a value based on multiple possible conditions? nevermore627 Excel Worksheet Functions 4 July 21st 06 01:14 AM
If Function with Multiple Conditions tlosgyl3 Excel Discussion (Misc queries) 6 July 11th 06 01:25 AM
How do I sort data with multiple conditions? CorinDarksoul Excel Worksheet Functions 1 June 26th 06 01:43 AM
Lookup with multiple conditions linglc Excel Discussion (Misc queries) 4 July 28th 05 04:44 PM


All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"