figgylynn1023
New Member
- Joined
- Jul 21, 2011
- Messages
- 24
I'm trying to nest IF statements so I don't have to program a macro to do a million sorts for value lookups and code another column accordingly.
There are four formulas I'd like to combine into one in the cells in column A, but everytime I try (I'm kind of new to Excel), it pops up with an error.
I have tested these all individually, but sometimes they seem to work and other times they don't.
1st formula:
If the value in C2 is "PDD", mark "PDD" in column A.
=IF(C2="PDD","PDD","")
2nd formula:
If the value in E2 is "BF", "RI", or "IA" AND the value in C2 is NOT "PDD", mark A2 the same as E2.
=IF(AND(OR(E2="BF")(E2="RI")(E2="IA"))*(C2<>"PDD"),E2,"")
3rd formula:
If the value in C2 is nothing, mark A2 same as E2.
=IF(C2="",E2,"")
4th formula:
If the value of C2 is "SDD" AND the value of B2 is NOT "Y"), mark A2 the same as E2.
=IF(AND(C2="SDD")*(B2<>"Y"),E2,"")
Essentially I want the single formula to be able to say IF the first formula is true do that, IF the second formula is true do that, IF the third formula is true do that, IF the fourth formula is true do that, and if none are true mark nothing.
Any help with the formulas...and particularly nesting them together would be much appreciated!! Thank you in advance!
There are four formulas I'd like to combine into one in the cells in column A, but everytime I try (I'm kind of new to Excel), it pops up with an error.
I have tested these all individually, but sometimes they seem to work and other times they don't.
1st formula:
If the value in C2 is "PDD", mark "PDD" in column A.
=IF(C2="PDD","PDD","")
2nd formula:
If the value in E2 is "BF", "RI", or "IA" AND the value in C2 is NOT "PDD", mark A2 the same as E2.
=IF(AND(OR(E2="BF")(E2="RI")(E2="IA"))*(C2<>"PDD"),E2,"")
3rd formula:
If the value in C2 is nothing, mark A2 same as E2.
=IF(C2="",E2,"")
4th formula:
If the value of C2 is "SDD" AND the value of B2 is NOT "Y"), mark A2 the same as E2.
=IF(AND(C2="SDD")*(B2<>"Y"),E2,"")
Essentially I want the single formula to be able to say IF the first formula is true do that, IF the second formula is true do that, IF the third formula is true do that, IF the fourth formula is true do that, and if none are true mark nothing.
Any help with the formulas...and particularly nesting them together would be much appreciated!! Thank you in advance!
Last edited: