Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help Nested If and And
Hi
I have terrible trouble reading and writing nested if and ANDs. I'd really appreciate it if someone could help me he This is the formula I have written: =IF($J9="PM",(IF(AND($K9<"",$Q9<"Yes"),SUM($C9:$ E9))),0) PM stands for the department, I have a range of them to check for, and I need the calculation to be specific to the department. K9 will have initials in it or nothing Q9 will have Yes or No or nothing C9-E9 will have numbers in them. What I want to do is check if the department is the right department, if it is then if there is something in the initials and Q9 does not equate to yes I would like to sum C9 and E9 otherwise it should be zero. However what happens is that if the department = "PM" then I get False in the cell and a message saying there is an error in the equation. All help is welcome and appreciated. Thanks Madeleine |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help Nested If and And
You need to provide a "FALSE" part for the 2nd IF:
=IF($J9="PM", IF(AND($K9<"",$Q9<"Yes"),SUM($C9:$E9),FalsePart Needed Here),0) Therefore this should do what you need: =IF($J9="PM",IF(AND($K9<"",$Q9<"Yes"),SUM($C9:$E 9),0),0) -- Rgds, Geoff "madeleine" wrote: Hi I have terrible trouble reading and writing nested if and ANDs. I'd really appreciate it if someone could help me he This is the formula I have written: =IF($J9="PM",(IF(AND($K9<"",$Q9<"Yes"),SUM($C9:$ E9))),0) PM stands for the department, I have a range of them to check for, and I need the calculation to be specific to the department. K9 will have initials in it or nothing Q9 will have Yes or No or nothing C9-E9 will have numbers in them. What I want to do is check if the department is the right department, if it is then if there is something in the initials and Q9 does not equate to yes I would like to sum C9 and E9 otherwise it should be zero. However what happens is that if the department = "PM" then I get False in the cell and a message saying there is an error in the equation. All help is welcome and appreciated. Thanks Madeleine |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help Nested If and And
Try this:
=IF(AND($J9="PM",$K9<"",$Q9<"Yes"),SUM($C9:$E9), 0) "madeleine" wrote: Hi I have terrible trouble reading and writing nested if and ANDs. I'd really appreciate it if someone could help me he This is the formula I have written: =IF($J9="PM",(IF(AND($K9<"",$Q9<"Yes"),SUM($C9:$ E9))),0) PM stands for the department, I have a range of them to check for, and I need the calculation to be specific to the department. K9 will have initials in it or nothing Q9 will have Yes or No or nothing C9-E9 will have numbers in them. What I want to do is check if the department is the right department, if it is then if there is something in the initials and Q9 does not equate to yes I would like to sum C9 and E9 otherwise it should be zero. However what happens is that if the department = "PM" then I get False in the cell and a message saying there is an error in the equation. All help is welcome and appreciated. Thanks Madeleine |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
nested if based on nested if in seperate sheet. how? | Excel Worksheet Functions | |||
using nested OR | Excel Worksheet Functions | |||
nested if | Excel Worksheet Functions | |||
Nested IF | Excel Discussion (Misc queries) | |||
Nested IF ?? | Excel Worksheet Functions |