PDA

View Full Version : Solved: Add to existing IF formula



Meatball
04-06-2009, 09:50 AM
What would be the best way to add to this formula
=IF(AND(I8=1,K8=1),"DE-ETCH & ETCH STD TOOL # ONLY",IF(AND(I8=1,OR(J8=1,K8=1,O8=1)),"DE-ETCH & ETCH",IF(K8=1,"STD TOOL # ONLY","")))
What I need to add is-- if anything is in S8, add what is in S8 and " & " in front of what the existing formula writes.
So if S8="2 PC PART", I8="1", K1="1", formula result would be "2PC PART & DE-ETCH & ETCH STD TOOL # ONLY".
I am sure this would involve a concatenate formula, I am just not sure if it can be added or if the formula has to be completely re-written.

Bob Phillips
04-06-2009, 10:14 AM
TRy

=IF(S8<>"",S8&" & ","")&IF(AND(I8=1,K8=1),"DE-ETCH & ETCH STD TOOL # ONLY",IF(AND(I8=1,OR(J8=1,K8=1,O8=1)),"DE-ETCH & ETCH",IF(K8=1,"STD TOOL # ONLY","")))

Meatball
04-07-2009, 09:26 AM
Thanks XLD. It does work as written-------but-------. Sometimes What is in S8 is the only part that is true, so if the rest of the formula is false then the "&" would not need to be there, only what is in S8. I can not see the fix yet but will keep thinking. If you can come up with the fix first I will give you a cookie!

Meatball
04-07-2009, 09:34 AM
By the way, This can be at the end instead of the beginning, does not matter which.

Bob Phillips
04-07-2009, 09:35 AM
Ginger please!

=S8&IF(AND(I8=1,K8=1),IF(S8<>""," & ","")&"DE-ETCH & ETCH STD TOOL # ONLY",
IF(AND(I8=1,OR(J8=1,K8=1,O8=1)),IF(S8<>""," & ","")&"DE-ETCH & ETCH",IF(K8=1,"STD TOOL # ONLY","")))

Meatball
04-07-2009, 10:00 AM
Sorry, no cookie today. You left the IF(S8<>""," & ","")&" part out of the last if statement. Solved equastion reads
=S8&IF(AND(I8=1,K8=1),IF(S8<>""," & ","")&"DE-ETCH & ETCH STD TOOL # ONLY",IF(AND(I8=1,OR(J8=1,K8=1,O8=1)),IF(S8<>""," & ","")&"DE-ETCH & ETCH",IF(K8=1,IF(S8<>""," & ","")&"STD TOOL # ONLY","")))
Thank you very much, those if's give me a headache when you get past 3 or 4 together!

Bob Phillips
04-07-2009, 10:20 AM
Darn!

I want my cookie:steamed:

Meatball
04-07-2009, 10:37 AM
Well, you did do MOST of the work. Here ya go. :cookie: