Combining formulas - not working

Good morning!

I have each of the following formulas in a separate cell and works just fine. However, I need it all in one cell but cannot seem to figure it out without getting error messages. Hoping someone can help me. I must use the contain function bc its pulling data from a text column. Also I want to add that if the source column is blank then this should be blank as well.

1- =IF(AND(Branch@row = "upstate"), IF(CONTAINS("PCA", Discipline@row), "Ivelise", IF(CONTAINS("HHA", Discipline@row), "Ivelise")))

2- =IF(AND(Branch@row = "downstate"), IF(CONTAINS("PCA", Discipline@row), "Mariel", IF(CONTAINS("HHA", Discipline@row), "Mariel")))

3- =IF(NOT(CONTAINS("PCA", Discipline@row)), "Perri")

4- =IF(NOT(CONTAINS("HHA", Discipline@row)), "Perri")


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!